tldraw/packages
alex a007c66b78
prevent hover indicator from showing when pointer isn't over the canvas (#2023)
Before the geometry change, we'd rely on the browser to tell us which
element was hovered, which meant that when the pointer left the canvas
we'd automatically clear the hovered shape.

Currently, we don't know whether the pointer is over the canvas or not -
so we keep showing the hover indicator for the last shape you had your
pointer over.

This diff adds an `isHoveringCanvas` prop to the instance state (true,
false, or null if the current pointer doesn't support hovering) that we
can use to track this and disable the hover indicator appropriately.

![Kapture 2023-10-05 at 12 00
00](https://github.com/tldraw/tldraw/assets/1489520/236b9459-878b-47e2-bcaa-10d245581347)


### Change Type

- [x] `minor` — New feature

### Test Plan

1. Create some shapes that go below the UI
2. Move the mouse from the shape to the UI
3. Hover indicator should disappear
2023-10-09 06:34:48 +00:00
..
assets Update CHANGELOG.md [skip ci] 2023-10-06 15:18:15 +00:00
editor prevent hover indicator from showing when pointer isn't over the canvas (#2023) 2023-10-09 06:34:48 +00:00
state Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
store Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
tldraw Restore background (#2037) 2023-10-09 06:19:41 +00:00
tlschema prevent hover indicator from showing when pointer isn't over the canvas (#2023) 2023-10-09 06:34:48 +00:00
utils Publish api.json (#2034) 2023-10-08 15:00:58 +00:00
validate Publish api.json (#2034) 2023-10-08 15:00:58 +00:00