From 33d8dd30b5b865ac870b53e6f116ba563435d815 Mon Sep 17 00:00:00 2001 From: DD Date: Fri, 22 Sep 2017 14:02:18 -0400 Subject: [PATCH] release things on deactivate --- src/helper/selection-tools/reshape-tool.js | 1 - src/helper/selection-tools/select-tool.js | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/helper/selection-tools/reshape-tool.js b/src/helper/selection-tools/reshape-tool.js index 8fad8c35..5c14d06c 100644 --- a/src/helper/selection-tools/reshape-tool.js +++ b/src/helper/selection-tools/reshape-tool.js @@ -197,7 +197,6 @@ class ReshapeTool extends paper.Tool { this.setHoveredItem = null; this.clearHoveredItem = null; this.onUpdateSvg = null; - this.prevHoveredItemId = null; this.lastEvent = null; } } diff --git a/src/helper/selection-tools/select-tool.js b/src/helper/selection-tools/select-tool.js index bfc989a6..bc33eea3 100644 --- a/src/helper/selection-tools/select-tool.js +++ b/src/helper/selection-tools/select-tool.js @@ -31,6 +31,7 @@ class SelectTool extends paper.Tool { this.boundingBoxTool = new BoundingBoxTool(onUpdateSvg); this.selectionBoxTool = new SelectionBoxTool(Modes.SELECT); this.selectionBoxMode = false; + this.prevHoveredItemId = null; // We have to set these functions instead of just declaring them because // paper.js tools hook up the listeners in the setter functions. @@ -131,6 +132,11 @@ class SelectTool extends paper.Tool { deactivateTool () { this.clearHoveredItem(); this.boundingBoxTool.removeBoundsPath(); + this.setHoveredItem = null; + this.clearHoveredItem = null; + this.onUpdateSvg = null; + this.boundingBoxTool = null; + this.selectionBoxTool = null; } }