diff options
author | wout <wout@impinc.co.uk> | 2014-06-28 18:39:11 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-06-28 18:39:11 +0200 |
commit | 2260f5789b48dd92dccf0dd734cf59cf957e4d52 (patch) | |
tree | 2c94e66afe60e45f34db6ced5f24069ab4466c72 /src/helpers.js | |
parent | 0d11ad263f193e8a585e7676deb8a60a8c103ef6 (diff) | |
download | svg.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.js | 7 |
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 |