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