aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-01-29 13:55:53 +0100
committerwout <wout@impinc.co.uk>2013-01-29 13:55:53 +0100
commit610e40c62cfbd704db39c1516320de5cf61e36bd (patch)
tree9e64174bb981e748b958db1b61e65c92ecefda2c /src
parent293ef89f8d00d1623d8d2edd79d3af7bc765c002 (diff)
downloadsvg.js-610e40c62cfbd704db39c1516320de5cf61e36bd.tar.gz
svg.js-610e40c62cfbd704db39c1516320de5cf61e36bd.zip
Fix in arrange module
Diffstat (limited to 'src')
-rw-r--r--src/arrange.js12
-rw-r--r--src/svg.js2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/arrange.js b/src/arrange.js
index 1ec3561..441a9c3 100644
--- a/src/arrange.js
+++ b/src/arrange.js
@@ -4,7 +4,7 @@
SVG.extend(SVG.Element, {
// Get all siblings, including myself
siblings: function() {
- return (this.nested() || this.doc()).children();
+ return this.parent.children();
},
// Get the curent position siblings
position: function() {
@@ -24,12 +24,14 @@ SVG.extend(SVG.Element, {
},
// Send given element one step backward
backward: function() {
- var i, parent = this.parent.level();
+ var i;
+
+ this.parent.level();
i = this.position();
if (i > 1)
- parent.remove(this).add(this, i - 1);
+ this.parent.remove(this).add(this, i - 1);
return this;
},
@@ -39,10 +41,10 @@ SVG.extend(SVG.Element, {
},
// Send given element all the way to the back
back: function() {
- var parent = this.parent.level();
+ this.parent.level();
if (this.position() > 1)
- parent.remove(this).add(this, 0);
+ this.parent.remove(this).add(this, 0);
return this;
}
diff --git a/src/svg.js b/src/svg.js
index d0e4188..409aa37 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -27,7 +27,7 @@ this.SVG = {
// Method for extending objects
extend: function(object, module) {
/* extend all container modules */
- if (object === SVG.Container)
+ if (object == SVG.Container)
('Clip Defs Doc Gradient Group Mask Nested Pattern').split(' ').forEach(function(m) {
if (SVG[m])
SVG.extend(SVG[m], module);