diff options
Diffstat (limited to 'src/viewbox.js')
-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 |