From 264005bc6b4f629d4ef7d32c0aa626e3da7afbc7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 13 Dec 2013 20:37:12 +0100 Subject: [PATCH] editor - fix missing canvas references --- .../modules/documentCanvas/canvas/documentElement.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index e553336..b5269ca 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -172,7 +172,7 @@ $.extend(DocumentNodeElement, { element.setWlxml({tag: wlxmlNode.getTagName(), klass: wlxmlNode.getClass()}); wlxmlNode.contents().forEach(function(node) { - container.append(DocumentElement.create(node).dom()); + container.append(DocumentElement.create(node, canvas).dom()); }.bind(this)); return dom; @@ -339,17 +339,17 @@ var DocumentTextElement = function(htmlElement, canvas) { }; $.extend(DocumentTextElement, { - createDOM: function(wlxmlTextNode) { + createDOM: function(wlxmlTextNode, canvas) { var dom = $('
') .attr('document-text-element', '') .text(wlxmlTextNode.getText() || utils.unicode.ZWS), - element = this.fromHTMLElement(dom[0], this); + element = this.fromHTMLElement(dom[0], canvas); element.data('wlxmlNode', wlxmlTextNode); return dom; }, create: function(wlxmlTextNode, canvas) { - return this.fromHTMLElement(this.createDOM(wlxmlTextNode)[0], canvas); + return this.fromHTMLElement(this.createDOM(wlxmlTextNode, canvas)[0], canvas); }, fromHTMLElement: function(htmlElement, canvas) { -- 2.20.1