summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-08-23 07:09:34 +0100
committerwout <wout@impinc.co.uk>2013-08-23 07:09:34 +0100
commit74614e02ec8c0a134d1320f8b7489e6a63fc88bc (patch)
tree26b9412220a2e11a2550c50bcb32b4fbd29ec1e5 /src
parent0ceb9b29401e26181d0b05cf8fed4c6aa1627447 (diff)
downloadsvg.js-74614e02ec8c0a134d1320f8b7489e6a63fc88bc.tar.gz
svg.js-74614e02ec8c0a134d1320f8b7489e6a63fc88bc.zip
Fix in viewbox
Diffstat (limited to 'src')
-rw-r--r--src/viewbox.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewbox.js b/src/viewbox.js
index ff84b93..128c4cd 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.offsetWidth || element.attr('width')
- this.height = element.node.offsetHeight || element.attr('height')
+ this.width = element.node.getBoundingClientRect().width
+ this.height = element.node.getBoundingClientRect().height
if (view) {
/* get width and height from viewbox */