Skip to content

Commit

Permalink
Fix removeShapeListeners
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Jul 24, 2024
1 parent 7e00d0d commit a7f168c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tools/drawShapeHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,15 @@ export class DrawShapeHandler {
removeShapeListeners(shapeGroup) {
// mouse over
this.#removeShapeOverListeners(shapeGroup);
// double click
shapeGroup.off('dblclick');
// remove listeners from shape
const shape = shapeGroup.getChildren(isNodeNameShape)[0];
if (shape instanceof Konva.Shape) {
shape.draggable(false);
shape.off('dragstart.draw');
shape.off('dragmove.draw');
shape.off('dragend.draw');
shape.off('dblclick');
}
// remove listeners from label
const label = shapeGroup.getChildren(isNodeNameLabel)[0];
Expand Down

0 comments on commit a7f168c

Please sign in to comment.