Closed tingard closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/1715labs/1715labs-pfe/3Qx8NejQLFqaoBjKQ8VVuxJhsJg1
✅ Preview: https://1715labs-pfe-git-make-polygon-only-edge-selectable-1715labs.vercel.app
Excellent point... I think we could break them out into two components, and have a "DraggablePolygon" as a separate drawing tool to be added in the future? Don't think we want polygons to ever be draggable for now.
Fair enough, that's what I figured.
Looking further into the Draggable
component, there is an onStart
prop that we could use: it accepts a function that can return false to do nothing, or true if the click occurred within a given radius of a line. I'll create a new issue for it should it ever come up
Modify polygon to be only selectable by clicking the line, not the face.