From df8db4b03df6740e47851907a4b901362634c50b Mon Sep 17 00:00:00 2001 From: wout Date: Fri, 23 Aug 2013 07:15:21 +0100 Subject: Fix in viewbox --- src/viewbox.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3