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