SHARE
TWEET

Untitled

a guest Jan 12th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. box to keep proportion when scaling with javascript
  2. if (height > width)
  3.     calculate the height
  4.     calculate the width
  5.     if (width > div.width)
  6.        width = div.width
  7.        height = div.width * aspect;
  8.    
  9. ....
  10.  
  11.         height = parseInt($('#height').val()) || 0;// making 0 as default value.
  12.         width = parseInt($('#width').val()) || 0;
  13. ....
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top