summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-23 12:31:19 +0100
committerwout <wout@impinc.co.uk>2012-12-23 12:31:19 +0100
commit9231e02fe876e3faa9c13a879223426284a7a921 (patch)
treeb44425f4935da436640e9234cbb351dbe322d65a /src
parent1ae730fec364f70d4541f38930929607dc2a31ac (diff)
downloadsvg.js-9231e02fe876e3faa9c13a879223426284a7a921.tar.gz
svg.js-9231e02fe876e3faa9c13a879223426284a7a921.zip
Fine-tuned safari bug fix
Diffstat (limited to 'src')
-rw-r--r--src/container.js26
-rw-r--r--src/doc.js3
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;
}
diff --git a/src/doc.js b/src/doc.js
index 0322e86..0669c52 100644
--- a/src/doc.js
+++ b/src/doc.js
@@ -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);