fix(ui): sync pointer position on pointerdown

There's a Konva bug where `pointerenter` & `pointerleave` events aren't fired correctly on the stage.

In 87fdea4cc6 I made a change that surfaced this bug, breaking touch and Apple Pencil interactions, because the cursor position doesn't get updated.

Simple fix - ensure we update the cursor on `pointerdown` events, even though we shouldn't need to.

Will make a bug report upstream
This commit is contained in:
psychedelicious
2024-10-09 12:00:51 +10:00
parent 965d6be1f4
commit 8d6996cdf0

View File

@@ -395,6 +395,7 @@ export class CanvasToolModule extends CanvasModuleBase {
const isMouseDown = getIsPrimaryMouseDown(e);
this.$isMouseDown.set(isMouseDown);
this.syncCursorPositions();
const cursorPos = this.$cursorPos.get();
const tool = this.$tool.get();
const settings = this.manager.stateApi.getSettings();