summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-02-14 22:25:12 +0100
committerwout <wout@impinc.co.uk>2014-02-14 22:25:12 +0100
commit8f9ccb16300142307b8ed6aed46c2a4984545600 (patch)
tree77040e5aa3802c7890d67aa0a62cdff432c2359f /src/svg.js
parenta7d61df3e8e065599c42752d60bb2f0190395080 (diff)
downloadsvg.js-8f9ccb16300142307b8ed6aed46c2a4984545600.tar.gz
svg.js-8f9ccb16300142307b8ed6aed46c2a4984545600.zip
Completely reworked `SVG.Text`, `SVG.TSpan` and `SVG.PathArray` and bumped to 1.0.0-rc.5
Diffstat (limited to 'src/svg.js')
-rwxr-xr-xsrc/svg.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/svg.js b/src/svg.js
index 364a786..07afa7a 100755
--- a/src/svg.js
+++ b/src/svg.js
@@ -66,13 +66,17 @@ SVG.prepare = function(element) {
/* select document body and create invisible svg element */
var body = document.getElementsByTagName('body')[0]
, draw = (body ? new SVG.Doc(body) : element.nested()).size(2, 2)
+ , path = SVG.create('path')
+
+ /* insert parsers */
+ draw.node.appendChild(path)
/* create parser object */
SVG.parser = {
body: body || element.parent
, draw: draw.style('opacity:0;position:fixed;left:100%;top:100%;overflow:hidden')
- , poly: draw.polygon().node
- , path: draw.path().node
+ , poly: draw.polyline().node
+ , path: path
}
}