X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c833dec45110d8cb85cdf63813a17b1c27516552..e32eab0:/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 c0dd361..d6d60d3 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -43,6 +43,7 @@ $.extend(DocumentElement.prototype, { this.state[key] = changes[key] = toUpdate[key]; } }.bind(this)); + // console.log(changes); if(_.isFunction(this.onStateChange)) { this.onStateChange(changes); if(_.isBoolean(changes.active)) { @@ -241,6 +242,9 @@ $.extend(DocumentNodeElement.prototype, { // }) this.dom.css('display', what); this._container().css('display', what); + }, + children: function() { + return []; } }); @@ -275,7 +279,7 @@ $.extend(DocumentTextElement.prototype, { if(text === '') { text = utils.unicode.ZWS; } - if(text !== this.getText()) { + if(text !== this.dom.contents()[0].data) { this.dom.contents()[0].data = text; } },