-
Notifications
You must be signed in to change notification settings - Fork 2.6k
refactor: remove type casting to improve safety #6101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@nayounsang is attempting to deploy a commit to the tldraw Team on Vercel. A member of the Team first needs to authorize it. |
Deployment failed with the following error:
Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is... not our best code. Is the logic here just that "the shape has a label and the label has text and the pointer is in the label?
Not sure why note shape is included here as it would still be selected even if the point is not in the label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dupe
@steveruizok It's definitely weird. I think I need to revisit the logic itself. Does |
The tldraw team can do it, and I am willing to improve this logic. I can get to work quickly (within 2-3 days). |
Describe what your pull request does. If you can, add GIFs or images showing the before and after of your change.
isGroup
.Geometry2d
does not have achildren
field.Change type
bugfix
improvement
feature
api
other
Test plan
run test & everything is fine
(this is the result for Editor)
Test Suites: 28 passed, 28 total Tests: 197 passed, 197 total Snapshots: 32 passed, 32 total Time: 9.302 s Ran all test suites.
Release notes
Editor/getShapeAtPoint