Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- box to keep proportion when scaling with javascript
- if (height > width)
- calculate the height
- calculate the width
- if (width > div.width)
- width = div.width
- height = div.width * aspect;
- ....
- height = parseInt($('#height').val()) || 0;// making 0 as default value.
- width = parseInt($('#width').val()) || 0;
- ....
Add Comment
Please, Sign In to add comment