diff --git a/src/canvas/view/FrameView.js b/src/canvas/view/FrameView.js index d390031aa..4b8977ab7 100644 --- a/src/canvas/view/FrameView.js +++ b/src/canvas/view/FrameView.js @@ -30,6 +30,7 @@ export default Backbone.View.extend({ '_emitUpdate' ); const { model, el } = this; + this.tools = {}; this.config = { ...(o.config || {}), frameView: this @@ -163,18 +164,20 @@ export default Backbone.View.extend({ }, _getTool(name) { + const { tools } = this; const toolsEl = this.getToolsEl(); - if (!this[name]) { - this[name] = toolsEl.querySelector(name); + if (!tools[name]) { + tools[name] = toolsEl.querySelector(name); } - return this[name]; + return tools[name]; }, remove() { const wrp = this.wrapper; this._toggleEffects(); + this.tools = {}; wrp && wrp.remove(); Backbone.View.prototype.remove.apply(this, arguments); },