summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-12 23:21:10 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-12 23:21:10 +0100
commit33e82b796e7870a9523b6e9653877a2613f8f7a2 (patch)
tree7450136c1178008d9ba17bc2408ee5f43c71e9c4 /src/utils
parent7b02d60829d1151a9fd1e726a0a995b92b165328 (diff)
downloadsvg.js-33e82b796e7870a9523b6e9653877a2613f8f7a2.tar.gz
svg.js-33e82b796e7870a9523b6e9653877a2613f8f7a2.zip
Release 3.0.53.0.5
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 3bac0de..c2046a9 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -56,9 +56,9 @@ export function capitalize (s) {
}
// Calculate proportional width and height values when necessary
-export function proportionalSize (element, width, height) {
+export function proportionalSize (element, width, height, box) {
if (width == null || height == null) {
- var box = element.bbox()
+ box = box || element.bbox()
if (width == null) {
width = box.width / box.height * height