X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1c4a242bf56575e265b38176aa1a71cc9d942e8f..4a1c68596333765b36f36a9cf88942f90c20efab:/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 ef3a1ee..7b7f7f9 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -5,7 +5,7 @@ define([ ], function($, _, utils) { 'use strict'; -/* global Node:false, document:false */ +/* global Node:false */ // DocumentElement represents a text or an element node from WLXML document rendered inside Canvas var DocumentElement = function(wlxmlNode, canvas) { @@ -26,9 +26,6 @@ $.extend(DocumentElement.prototype, { refresh: function() { // noop }, - bound: function() { - return $.contains(document.documentElement, this.dom()[0]); - }, dom: function() { return this.$element; }, @@ -54,20 +51,6 @@ $.extend(DocumentElement.prototype, { return other && (typeof other === typeof this) && other.dom()[0] === this.dom()[0]; }, - getPreviousTextElement: function(includeInvisible) { - return this.getNearestTextElement('above', includeInvisible); - }, - - getNextTextElement: function(includeInvisible) { - return this.getNearestTextElement('below', includeInvisible); - }, - - getNearestTextElement: function(direction, includeInvisible) { - includeInvisible = includeInvisible !== undefined ? includeInvisible : false; - var selector = '[document-text-element]' + (includeInvisible ? '' : ':visible'); - return this.canvas.getDocumentElement(utils.nearestInDocumentOrder(selector, direction, this.dom()[0])); - }, - trigger: function() { //this.canvas.bus.trigger() }