5 Commits

Author SHA1 Message Date
Rob Watson
3dcc1edc62 Replace Selection interface with CanvasRange
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-04 08:35:54 +01:00
Rob Watson
9f76d2764f Refactor top-level state management => useReducer
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-03 19:56:05 +01:00
Rob Watson
a855d589f3 Refactor HudCanvasState tests 2022-02-03 19:44:28 +01:00
Rob Watson
6ba19b3e01 Bug fix: prevent incorrect selectionChange callbacks
All checks were successful
continuous-integration/drone/push Build is passing
When re-rendering the HudCanvas component, the selectionChange callback
should not be triggered with the passed-in properties. Doing so leads to
incorrect selection values being bubbled up when the selection is not
enclosed in the viewport.

The state management should probably be improved to avoid this dance
completely, possibly by hoisting all of this state up to the top-level.
2022-01-29 12:32:39 +01:00
Rob Watson
5af8f0c319 HudCanvas: extract HudCanvasState
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-24 20:33:16 +01:00