aboutsummaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg.js')
-rw-r--r--src/svg.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svg.js b/src/svg.js
index c5bc069..775b6fa 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -126,7 +126,7 @@ SVG.adopt = function(node) {
SVG.prepare = function() {
// Select document body and create invisible svg element
var body = document.getElementsByTagName('body')[0]
- , draw = (body ? new SVG.Doc(body) : new SVG.Doc(document.documentElement).nested()).size(2, 0)
+ , draw = (body ? new SVG.Doc(body) : SVG.adopt(document.documentElement).nested()).size(2, 0)
// Create parser object
SVG.parser = {
@@ -137,7 +137,7 @@ SVG.prepare = function() {
left:'-100%',
top:'-100%',
overflow:'hidden'
- })
+ }).node
, poly: draw.polyline().node
, path: draw.path().node
, native: SVG.create('svg')