aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-07-25 17:47:03 +0200
committerwout <wout@impinc.co.uk>2014-07-25 17:47:03 +0200
commit9842187d84e71e736ada6a2e9444bab592945600 (patch)
tree3b2e67ca99fd881d0d6a8e2ab6358c4ef077a74a /src/helpers.js
parent94077ff77815f622f6ad0daebf26160ec33e0271 (diff)
downloadsvg.js-9842187d84e71e736ada6a2e9444bab592945600.tar.gz
svg.js-9842187d84e71e736ada6a2e9444bab592945600.zip
Various small fixes
Diffstat (limited to 'src/helpers.js')
-rw-r--r--src/helpers.js10
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