diff options
author | wout <wout@impinc.co.uk> | 2013-08-23 07:09:34 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-08-23 07:09:34 +0100 |
commit | 74614e02ec8c0a134d1320f8b7489e6a63fc88bc (patch) | |
tree | 26b9412220a2e11a2550c50bcb32b4fbd29ec1e5 /src | |
parent | 0ceb9b29401e26181d0b05cf8fed4c6aa1627447 (diff) | |
download | svg.js-74614e02ec8c0a134d1320f8b7489e6a63fc88bc.tar.gz svg.js-74614e02ec8c0a134d1320f8b7489e6a63fc88bc.zip |
Fix in viewbox
Diffstat (limited to 'src')
-rw-r--r-- | src/viewbox.js | 4 |
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 */ |