89881397b5
Currently, when dragging line handles they'll snap to the outlines of other shapes, but not to their vertices. This can make it hard to snap precisely to certain key places, like the handles of other lines, or the corners of `geo` shapes. This diff adds a new snap type for handles - snapping to points: ![Kapture 2024-02-14 at 16 30 41](https://github.com/tldraw/tldraw/assets/1489520/046109d3-2961-463f-bf71-9350ea1204bc) This adds to the new snapping API so the snapping points can very easily be customised on a shape-by-shape basis. Closes TLD-2198 This PR is part of a series - please don't merge it until the things before it have landed! 1. #2827 2. #2831 3. #2793 4. #2841 (you are here) 5. #2845 ### Change Type - [x] `minor` — New feature ### Test Plan 1. create a line shape 2. drag its handles whilst holding command 3. it should snap to the outlines of other shapes, vertices of other line shapes, and the bounding box corners/center of most 'boxy' shapes (geo, embed, etc) - [x] Unit Tests ### Release Notes - Line handles |
||
---|---|---|
.. | ||
api.json |