diff options
author | wout <wout@impinc.co.uk> | 2014-06-21 18:25:29 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-06-21 18:25:29 +0200 |
commit | 19b6fd4338246d1fd9ca4806e57c7aebcec63826 (patch) | |
tree | 3dd1d207de9f586f7e4d4cd36917e347ab022a9e /src/arrange.js | |
parent | bb0e6be2da0cea98c5303871c0be055f5f70d7a9 (diff) | |
download | svg.js-19b6fd4338246d1fd9ca4806e57c7aebcec63826.tar.gz svg.js-19b6fd4338246d1fd9ca4806e57c7aebcec63826.zip |
Removed all structural references
Diffstat (limited to 'src/arrange.js')
-rwxr-xr-x | src/arrange.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/arrange.js b/src/arrange.js index a48ec5d..5c4e878 100755 --- a/src/arrange.js +++ b/src/arrange.js @@ -4,11 +4,11 @@ SVG.extend(SVG.Element, { // Get all siblings, including myself siblings: function() { - return this.parent.children() + return this.parent().children() } // Get the curent position siblings , position: function() { - return this.parent.index(this) + return this.parent().index(this) } // Get the next element (will return null if there is none) , next: function() { @@ -21,25 +21,25 @@ SVG.extend(SVG.Element, { // Send given element one step forward , forward: function() { var i = this.position() - return this.parent.removeElement(this).put(this, i + 1) + return this.parent().removeElement(this).put(this, i + 1) } // Send given element one step backward , backward: function() { var i = this.position() if (i > 0) - this.parent.removeElement(this).add(this, i - 1) + this.parent().removeElement(this).add(this, i - 1) return this } // Send given element all the way to the front , front: function() { - return this.parent.removeElement(this).put(this) + return this.parent().removeElement(this).put(this) } // Send given element all the way to the back , back: function() { if (this.position() > 0) - this.parent.removeElement(this).add(this, 0) + this.parent().removeElement(this).add(this, 0) return this } @@ -49,7 +49,7 @@ SVG.extend(SVG.Element, { var i = this.position() - this.parent.add(element, i) + this.parent().add(element, i) return this } @@ -59,7 +59,7 @@ SVG.extend(SVG.Element, { var i = this.position() - this.parent.add(element, i + 1) + this.parent().add(element, i + 1) return this } |