tldraw/packages
alex cd8c92779d
Expand selection outline for single-selected draw shape (#1379)
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
2023-05-16 08:35:45 +00:00
..
assets Rework the assets package for strategy-specific imports (#1341) 2023-05-09 16:08:38 +00:00
editor Expand selection outline for single-selected draw shape (#1379) 2023-05-16 08:35:45 +00:00
file-format avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
polyfills avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
primitives avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
tldraw avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
tlschema avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
tlstore avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
tlsync-client avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
tlvalidate avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
ui Add localizations for snapshots links (#1347) 2023-05-15 15:30:35 +00:00
utils avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00