X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/21f5b21a44641ccd96582e0e5ebaddd2d657c867..0c53f4a333bbfcc04e75ad2f462f840301514321:/src/editor/modules/documentCanvas/canvas/wlxmlListener.js?ds=sidebyside diff --git a/src/editor/modules/documentCanvas/canvas/wlxmlListener.js b/src/editor/modules/documentCanvas/canvas/wlxmlListener.js index cbb582d..ecf4900 100644 --- a/src/editor/modules/documentCanvas/canvas/wlxmlListener.js +++ b/src/editor/modules/documentCanvas/canvas/wlxmlListener.js @@ -14,6 +14,7 @@ $.extend(Listener.prototype, { if(wlxmlDocument === this.wlxmlDocument) { return; } + this.wlxmlDocument = wlxmlDocument; wlxmlDocument.on('change', function(event) { var handler = handlers[event.type]; @@ -21,6 +22,10 @@ $.extend(Listener.prototype, { handler.bind(this)(event); } }, this); + + wlxmlDocument.on('contentSet', function() { + this.canvas.loadWlxmlDocument(wlxmlDocument); + }, this); } });