diff options
Diffstat (limited to 'src/viewbox.js')
-rwxr-xr-x | src/viewbox.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/viewbox.js b/src/viewbox.js index e8736aa..11a7138 100755 --- a/src/viewbox.js +++ b/src/viewbox.js @@ -15,13 +15,13 @@ SVG.ViewBox = function(element) { /* find nearest non-percentual dimensions */ while (width.unit == '%') { wm *= width.value - width = new SVG.Number(we instanceof SVG.Doc ? we.parent.offsetWidth : we.parent.width()) - we = we.parent + width = new SVG.Number(we instanceof SVG.Doc ? we.parent().offsetWidth : we.parent().width()) + we = we.parent() } while (height.unit == '%') { hm *= height.value - height = new SVG.Number(he instanceof SVG.Doc ? he.parent.offsetHeight : he.parent.height()) - he = he.parent + height = new SVG.Number(he instanceof SVG.Doc ? he.parent().offsetHeight : he.parent().height()) + he = he.parent() } /* ensure defaults */ |