Skip to content

Commit be65d79

Browse files
committed
disable other tools when 'move' is selected
1 parent b8f3f37 commit be65d79

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ let actionHandler = {
9696
'noEdit': () => {
9797
document.getElementById('svgDiv').style.cursor = 'auto';
9898
guiState = 'noEdit';
99+
100+
// explicitly remove stale listeners (as clearExpressions(), which resets the svg, is not called.)
101+
['mouseenter', 'mousemove', 'mouseleave', 'click'].forEach((s) => svg.on(s, null))
99102
closeInputs();
100103
clearOverlay();
101104
},

0 commit comments

Comments
 (0)