aboutsummaryrefslogtreecommitdiffstats
path: root/src/container.js
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/container.js
parent1ae730fec364f70d4541f38930929607dc2a31ac (diff)
downloadsvg.js-9231e02fe876e3faa9c13a879223426284a7a921.tar.gz
svg.js-9231e02fe876e3faa9c13a879223426284a7a921.zip
Fine-tuned safari bug fix
Diffstat (limited to 'src/container.js')
-rw-r--r--src/container.js26
1 files changed, 12 insertions, 14 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;
}