Skip to content

Commit

Permalink
fix(classifier): Polygon tool drag handles
Browse files Browse the repository at this point in the history
Refactor the polygon tool drag handles so that `pointerdown` does not close and finish the shape, overriding the pointer dragging behaviour. Instead, the shape is closed and finished on `pointerup`.
  • Loading branch information
eatyourgreens committed Dec 16, 2024
1 parent 23916ae commit c791810
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ function Polygon({ active, mark, scale, onFinish }) {
strokeWidth={strokeWidth}
strokeDasharray={strokeDasharray}
/>
)}

{active &&
points.map((point, i) => (
Expand All @@ -84,7 +83,7 @@ function Polygon({ active, mark, scale, onFinish }) {
y={point.y}
fill='currentColor'
dragMove={point.moveTo}
onPointerDown={handleClosePolygon}
onPointerUp={handleClosePolygon}
/>
))
}
Expand Down

0 comments on commit c791810

Please sign in to comment.