-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(classifier): Polygon tool drag handles #6550
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,6 @@ function Polygon({ active, mark, scale, onFinish }) { | |
strokeWidth={strokeWidth} | ||
strokeDasharray={strokeDasharray} | ||
/> | ||
)} | ||
|
||
{active && | ||
points.map((point, i) => ( | ||
|
@@ -84,7 +83,7 @@ function Polygon({ active, mark, scale, onFinish }) { | |
y={point.y} | ||
fill='currentColor' | ||
dragMove={point.moveTo} | ||
onPointerDown={handleClosePolygon} | ||
onPointerUp={handleClosePolygon} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously this overrode There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. b3b8304 might be a better fix. It decorates existing event handlers with draggable behaviour, rather than replacing or overriding them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested in Chrome and Firefox with a few different drawing tools. Seems to work OK, and dragging is now cancelled on pointer up, while also running the mark's Drawing while zoomed-in still triggers #6490 in Firefox, but that's a separate issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ellipse tool still seems to work as expected in I Fancy Cats. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've updated the PR description too, as the scope has changed from the polygon tool to the |
||
/> | ||
)) | ||
} | ||
|
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.
The polygon tool code is actually broken here, and has been for a while. 😳