From 95ea9a14bac299694222bda7ec8041baa918595e Mon Sep 17 00:00:00 2001 From: ivmartel Date: Wed, 4 Dec 2024 12:39:55 +0100 Subject: [PATCH] Start stage listen even if no shapes, fixes #1819 --- src/gui/drawLayer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/drawLayer.js b/src/gui/drawLayer.js index ddd39a2538..c1d22a6450 100644 --- a/src/gui/drawLayer.js +++ b/src/gui/drawLayer.js @@ -614,7 +614,7 @@ export class DrawLayer { activateCurrentPositionShapes(flag) { const konvaLayer = this.getKonvaLayer(); - // stop listening + // stop stage listening this.#konvaStage.listening(false); if (typeof this.#shapeHandler !== 'undefined') { @@ -637,12 +637,13 @@ export class DrawLayer { const drawController = this.getDrawController(); if (flag && drawController.getAnnotationGroup().isEditable()) { + // start stage listening + this.#konvaStage.listening(true); // shape groups at the current position const shapeGroups = this.getCurrentPosGroup().getChildren(); // listen if we have shapes if (shapeGroups.length !== 0) { - this.#konvaStage.listening(true); konvaLayer.listening(true); } // add listeners for position group