cd8c92779d
Expand the selection outline on draw shapes according to pen thickness when only one shape is selected. ![Kapture 2023-05-15 at 16 20 01](https://github.com/tldraw/tldraw/assets/1489520/373f0ec1-f43d-46c9-9729-0c84aaf2564b) Right now the outline of many of our shapes don't take stroke thickness into account. This is a pretty hard thing to get right, so in the short term here's a fix for one of the most common places this is an issue: selecting a single horizontal/vertical draw shape. This fix isn't perfect: resizing gets slightly janky when you completely flip the shape - see how the handle leaves the cursor behind in the gif when that happens. We can revisit with a more comprehensive solution later. This is pulled out from the highlighter work! The highlighter shape will use the shape APIs added here. ### Change Type - [x] `patch` — Bug Fix ### Test Plan 1. Create a draw shape 2. Select it 3. Selection bounds should include the stroke width 4. Add another shape to the selection 5. Selection bounds should no longer include the stroke width ### Release Notes - Improve selection outlines around horizontal or vertical draw shapes |
||
---|---|---|
.. | ||
assets | ||
editor | ||
file-format | ||
polyfills | ||
primitives | ||
tldraw | ||
tlschema | ||
tlstore | ||
tlsync-client | ||
tlvalidate | ||
ui | ||
utils |