diff options
author | wout <wout@impinc.co.uk> | 2012-12-23 12:31:19 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-23 12:31:19 +0100 |
commit | 9231e02fe876e3faa9c13a879223426284a7a921 (patch) | |
tree | b44425f4935da436640e9234cbb351dbe322d65a /src | |
parent | 1ae730fec364f70d4541f38930929607dc2a31ac (diff) | |
download | svg.js-9231e02fe876e3faa9c13a879223426284a7a921.tar.gz svg.js-9231e02fe876e3faa9c13a879223426284a7a921.zip |
Fine-tuned safari bug fix
Diffstat (limited to 'src')
-rw-r--r-- | src/container.js | 26 | ||||
-rw-r--r-- | src/doc.js | 3 |
2 files changed, 13 insertions, 16 deletions
diff --git a/src/container.js b/src/container.js index c5658ee..369dc51 100644 --- a/src/container.js +++ b/src/container.js @@ -109,20 +109,18 @@ SVG.Container = { // basically it sets the position of the svg node to absolute // when the dom is loaded, and resets it to relative a few ms later. stage: function() { - if (document.readyState !== 'complete') { - var r, e = this; - - r = function() { - if (document.readyState === 'complete') { - e.node.style.position = 'absolute'; - setTimeout(function() { e.node.style.position = 'relative'; }, 5); - } else { - setTimeout(r, 10); - } - }; - - r(); - } + var r, e = this; + + r = function() { + if (document.readyState === 'complete') { + e.node.style.position = 'absolute'; + setTimeout(function() { e.node.style.position = 'relative'; }, 5); + } else { + setTimeout(r, 10); + } + }; + + r(); return this; } @@ -8,9 +8,8 @@ SVG.Doc = function Doc(e) { // set this. - attr({ xmlns: SVG.ns, version: '1.1', style: 'position:relative;' }). + attr({ xmlns: SVG.ns, version: '1.1' }). attr('xlink', SVG.xlink, SVG.ns). - size(e.offsetWidth, e.offsetHeight). defs(); e.appendChild(this.node); |