diff options
author | wout <wout@impinc.co.uk> | 2013-08-23 07:15:21 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-08-23 07:15:21 +0100 |
commit | df8db4b03df6740e47851907a4b901362634c50b (patch) | |
tree | fccbc36ba5a4de16c35a2a09e825fbe0afa372b2 /src | |
parent | 74614e02ec8c0a134d1320f8b7489e6a63fc88bc (diff) | |
download | svg.js-df8db4b03df6740e47851907a4b901362634c50b.tar.gz svg.js-df8db4b03df6740e47851907a4b901362634c50b.zip |
Fix in viewbox0.33
Diffstat (limited to 'src')
-rw-r--r-- | src/viewbox.js | 7 |
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 |