aboutsummaryrefslogtreecommitdiffstats
path: root/src/arrange.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-02-20 19:10:03 +0100
committerwout <wout@impinc.co.uk>2013-02-20 19:10:03 +0100
commitae878fd63077d4c95f2de9053a6f0951b55239eb (patch)
tree5dba7bd42a8b5702faeb6cc12d2b4d4099841e51 /src/arrange.js
parent5020240e4029a61a9620f21d7be4d9764e7723d1 (diff)
downloadsvg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.tar.gz
svg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.zip
Created separate classes for SVG.ViewBox anSVG.BBox0.6
Diffstat (limited to 'src/arrange.js')
-rw-r--r--src/arrange.js58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/arrange.js b/src/arrange.js
index 441a9c3..47134ed 100644
--- a/src/arrange.js
+++ b/src/arrange.js
@@ -4,49 +4,49 @@
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.siblings().indexOf(this);
- },
+, position: function() {
+ return this.siblings().indexOf(this)
+ }
// Get the next element (will return null if there is none)
- next: function() {
- return this.siblings()[this.position() + 1];
- },
+, next: function() {
+ return this.siblings()[this.position() + 1]
+ }
// Get the next element (will return null if there is none)
- previous: function() {
- return this.siblings()[this.position() - 1];
- },
+, previous: function() {
+ return this.siblings()[this.position() - 1]
+ }
// Send given element one step forward
- forward: function() {
- return this.parent.remove(this).put(this, this.position() + 1);
- },
+, forward: function() {
+ return this.parent.remove(this).put(this, this.position() + 1)
+ }
// Send given element one step backward
- backward: function() {
- var i;
+, backward: function() {
+ var i
- this.parent.level();
+ this.parent.level()
- i = this.position();
+ i = this.position()
if (i > 1)
- this.parent.remove(this).add(this, i - 1);
+ this.parent.remove(this).add(this, i - 1)
- return this;
- },
+ return this
+ }
// Send given element all the way to the front
- front: function() {
- return this.parent.remove(this).put(this);
- },
+, front: function() {
+ return this.parent.remove(this).put(this)
+ }
// Send given element all the way to the back
- back: function() {
- this.parent.level();
+, back: function() {
+ this.parent.level()
if (this.position() > 1)
- this.parent.remove(this).add(this, 0);
+ this.parent.remove(this).add(this, 0)
- return this;
+ return this
}
-}); \ No newline at end of file
+}) \ No newline at end of file