From 69f9d1207cdf412d38cf2fda61f9af92ecbea619 Mon Sep 17 00:00:00 2001 From: tpoisseau <22891227+tpoisseau@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:39:10 +0200 Subject: [PATCH] chore: add comments --- lib/canvas_editor/events.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/canvas_editor/events.js b/lib/canvas_editor/events.js index 28a237f6..daa4df4a 100644 --- a/lib/canvas_editor/events.js +++ b/lib/canvas_editor/events.js @@ -47,9 +47,11 @@ function addPointerListeners(canvasElement, drawArea, JavaEditorArea) { fireMouseEvent(JavaEditorArea.MOUSE_EVENT_CLICKED, ev, ev.detail); }); canvasElement.addEventListener('pointerenter', (ev) => { + // event.detail on pointerenter doesn't include the click count fireMouseEvent(JavaEditorArea.MOUSE_EVENT_ENTERED, ev); }); canvasElement.addEventListener('pointerleave', (ev) => { + // event.detail on pointerenter doesn't include the click count fireMouseEvent(JavaEditorArea.MOUSE_EVENT_EXITED, ev); }); canvasElement.addEventListener('pointermove', (ev) => {