X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/88fd67cfb21bf9b51d2d070de059dc4bbbab63dd..abd8692003a505de041558bd43f0ce1e884e8bbd:/src/editor/modules/documentCanvas/canvas/documentElement.js diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index 02c6e19..2c146bb 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -16,13 +16,13 @@ var DocumentElement = function(wlxmlNode, canvas) { } this.wlxmlNode = wlxmlNode; this.canvas = canvas; + + this.$element = this.createDOM(); + this.$element.data('canvas-element', this); + this.data('wlxmlNode', wlxmlNode); }; $.extend(DocumentElement.prototype, { - _setupDOMHandler: function(htmlElement) { - this.$element = $(htmlElement); - this.$element.data('canvas-element', this); - }, bound: function() { return $.contains(document.documentElement, this.dom()[0]); }, @@ -118,29 +118,7 @@ $.extend(DocumentElement.prototype, { // DocumentNodeElement represents an element node from WLXML document rendered inside Canvas var DocumentNodeElement = function(wlxmlNode, canvas) { DocumentElement.call(this, wlxmlNode, canvas); - - var dom = $('