diff options
Diffstat (limited to 'src/helpers.js')
-rw-r--r-- | src/helpers.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/helpers.js b/src/helpers.js index 15842b5..bf417b7 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -28,12 +28,10 @@ function compToHex(comp) { // Calculate proportional width and height values when necessary function proportionalSize(box, width, height) { - if (width == null || height == null) { - if (height == null) - height = box.height / box.width * width - else if (width == null) - width = box.width / box.height * height - } + if (height == null) + height = box.height / box.width * width + else if (width == null) + width = box.width / box.height * height return { width: width |