X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c29d2f9290ba801c3f89e8034512f2cfc2655f8d..0e100dced6c5982e02aaa0bda87238418976adde:/src/editor/modules/documentCanvas/canvas/canvas.js diff --git a/src/editor/modules/documentCanvas/canvas/canvas.js b/src/editor/modules/documentCanvas/canvas/canvas.js index 8ca71ac..05c109c 100644 --- a/src/editor/modules/documentCanvas/canvas/canvas.js +++ b/src/editor/modules/documentCanvas/canvas/canvas.js @@ -138,8 +138,10 @@ $.extend(Canvas.prototype, Backbone.Events, { }, reloadRoot: function() { + if(this.rootElement) { + this.rootElement.detach(); + } this.rootElement = this.createElement(this.wlxmlDocument.root); - this.rootWrapper.empty(); this.rootWrapper.append(this.rootElement.dom); },