summaryrefslogtreecommitdiffstats
path: root/src/helpers.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-06-28 18:39:11 +0200
committerwout <wout@impinc.co.uk>2014-06-28 18:39:11 +0200
commit2260f5789b48dd92dccf0dd734cf59cf957e4d52 (patch)
tree2c94e66afe60e45f34db6ced5f24069ab4466c72 /src/helpers.js
parent0d11ad263f193e8a585e7676deb8a60a8c103ef6 (diff)
downloadsvg.js-2260f5789b48dd92dccf0dd734cf59cf957e4d52.tar.gz
svg.js-2260f5789b48dd92dccf0dd734cf59cf957e4d52.zip
Added new SVG.Line class and working on SVG.Matrix
Diffstat (limited to 'src/helpers.js')
-rw-r--r--src/helpers.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/helpers.js b/src/helpers.js
index ad73fde..9411e5e 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -93,15 +93,12 @@ function arrayToString(a) {
// Deep new id assignment
function assignNewId(node) {
- // Adopt element and assign new id
- var element = SVG.adopt(node).id(SVG.eid(node.nodeName))
-
// Do the same for SVG child nodes as well
for (var i = node.childNodes.length - 1; i >= 0; i--)
if (node.childNodes[i] instanceof SVGElement)
assignNewId(node.childNodes[i])
- return element
+ return SVG.adopt(node).id(SVG.eid(node.nodeName))
}
// Add more bounding box properties
@@ -110,6 +107,8 @@ function boxProperties(b) {
b.y2 = b.y + b.height
b.cx = b.x + b.width / 2
b.cy = b.y + b.height / 2
+
+ return b
}
// Parse a matrix string