X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/fd61d32052c78abe8ea8adba3ca0de00b5e12976..215b225ef3f6716982d4bdc873c08f8561533a3d:/src/smartxml/fragments.js diff --git a/src/smartxml/fragments.js b/src/smartxml/fragments.js index d932592..f15a9e8 100644 --- a/src/smartxml/fragments.js +++ b/src/smartxml/fragments.js @@ -76,20 +76,20 @@ $.extend(RangeFragment.prototype, { this.startNode = this.document.getNodeByPath(this.startNodePath); this.endNode = this.document.getNodeByPath(this.endNodePath); }, - hasSiblingBoundries: function() { + hasSiblingBoundaries: function() { return this.isValid() && this.startNode.isSiblingOf(this.endNode); }, - hasSameBoundries: function() { + hasSameBoundaries: function() { return this.isValid() && this.startNode.sameNode(this.endNode); }, - boundriesSiblingParents: function() { + boundariesSiblingParents: function() { return this.startNode.document.getSiblingParents({ node1: this.startNode, node2: this.endNode }); }, getCommonParent: function() { - var siblingParents = this.boundriesSiblingParents(); + var siblingParents = this.boundariesSiblingParents(); if(siblingParents) { return siblingParents.node1.parent(); }