X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/15376df0aa6df3484cd942b4be2207b94172c502..a920c78116d0177f440c98fb4a067437fea5f27c:/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 05c109c..d4e16ad 100644 --- a/src/editor/modules/documentCanvas/canvas/canvas.js +++ b/src/editor/modules/documentCanvas/canvas/canvas.js @@ -349,7 +349,7 @@ $.extend(Canvas.prototype, Backbone.Events, { if(byBrowser && byBrowser.parent().sameNode(nodeToLand)) { return byBrowser; } - return e.getVerticallyFirstTextElement(); + return _.isFunction(e.getVerticallyFirstTextElement) ? e.getVerticallyFirstTextElement({considerChildren: false}) : null; }.bind(this); var _markAsCurrent = function(element) { if(element instanceof documentElement.DocumentTextElement) { @@ -418,14 +418,6 @@ $.extend(Canvas.prototype, Backbone.Events, { if(position.element) { this._moveCaretToTextElement(position.element, position.offset); } - }, - - toggleGrid: function() { - this.rootWrapper.toggleClass('grid-on'); - this.trigger('changed'); - }, - isGridToggled: function() { - return this.rootWrapper.hasClass('grid-on'); } });