Skip to content

Commit

Permalink
Exit editable handling if not listening
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Aug 29, 2024
1 parent cfaf762 commit 78d0f69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/drawLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,14 @@ export class DrawLayer {
annotationGroup.addEventListener(
'annotationgroupeditablechange',
(event) => {
// exit if not listening, ie draw tool is not activated on this layer
if (!this.#konvaStage.listening()) {
return;
}

this.#shapeHandler.disableAndResetEditor();
const shapeGroups =
this.getCurrentPosGroup().getChildren();

if (event.data) {
shapeGroups.forEach((group) => {
if (group instanceof Konva.Group) {
Expand Down

0 comments on commit 78d0f69

Please sign in to comment.