summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-08-23 07:15:21 +0100
committerwout <wout@impinc.co.uk>2013-08-23 07:15:21 +0100
commitdf8db4b03df6740e47851907a4b901362634c50b (patch)
treefccbc36ba5a4de16c35a2a09e825fbe0afa372b2 /src
parent74614e02ec8c0a134d1320f8b7489e6a63fc88bc (diff)
downloadsvg.js-df8db4b03df6740e47851907a4b901362634c50b.tar.gz
svg.js-df8db4b03df6740e47851907a4b901362634c50b.zip
Fix in viewbox0.33
Diffstat (limited to 'src')
-rw-r--r--src/viewbox.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/viewbox.js b/src/viewbox.js
index 128c4cd..dfafed4 100644
--- a/src/viewbox.js
+++ b/src/viewbox.js
@@ -7,8 +7,8 @@ SVG.ViewBox = function(element) {
/* clone attributes */
this.x = box.x
this.y = box.y
- this.width = element.node.getBoundingClientRect().width
- this.height = element.node.getBoundingClientRect().height
+ this.width = element.node.clientWidth || element.node.getBoundingClientRect().width
+ this.height = element.node.clientHeight || element.node.getBoundingClientRect().height
if (view) {
/* get width and height from viewbox */
@@ -41,5 +41,4 @@ SVG.extend(SVG.ViewBox, {
return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height
}
-})
-
+}) \ No newline at end of file