From 8f9ccb16300142307b8ed6aed46c2a4984545600 Mon Sep 17 00:00:00 2001 From: wout Date: Fri, 14 Feb 2014 22:25:12 +0100 Subject: Completely reworked `SVG.Text`, `SVG.TSpan` and `SVG.PathArray` and bumped to 1.0.0-rc.5 --- src/svg.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/svg.js') 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 } } -- cgit v1.2.3