mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 13:32:28 -05:00
release things on deactivate
This commit is contained in:
parent
32661dde92
commit
33d8dd30b5
2 changed files with 6 additions and 1 deletions
|
@ -197,7 +197,6 @@ class ReshapeTool extends paper.Tool {
|
|||
this.setHoveredItem = null;
|
||||
this.clearHoveredItem = null;
|
||||
this.onUpdateSvg = null;
|
||||
this.prevHoveredItemId = null;
|
||||
this.lastEvent = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue