summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-22 13:53:14 +0100
committerwout <wout@impinc.co.uk>2014-01-22 13:53:14 +0100
commitc9678562e1ba5c010ba15aa036f6ca86386c5b65 (patch)
treed8dd276b4cb6293e0a19813dc415c0ce4e149e76 /src
parentf8236f9b6eda01897e0ebb69867c50c2669a9c86 (diff)
downloadsvg.js-c9678562e1ba5c010ba15aa036f6ca86386c5b65.tar.gz
svg.js-c9678562e1ba5c010ba15aa036f6ca86386c5b65.zip
Fix in SVG.Viewbox
Diffstat (limited to 'src')
-rwxr-xr-xsrc/viewbox.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewbox.js b/src/viewbox.js
index dfafed4..43849f2 100755
--- 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.clientWidth || element.node.getBoundingClientRect().width
- this.height = element.node.clientHeight || element.node.getBoundingClientRect().height
+ this.width = element.node.clientWidth || element.attr('width')
+ this.height = element.node.clientHeight || element.attr('height')
if (view) {
/* get width and height from viewbox */