bfr

by zz on March 9th, 2010
No notes
Syntax: JavaScript
Show lines - Hide lines - Show in textbox - Download
					var scaleX = $thumbW / selection.width;
					var scaleY = $thumbH / selection.height;
					if(scaleX == Infinity || scaleY == Infinity) return false;
 
					$('#thumbnail + div > img').css({
						width: Math.round(scaleX * $imgW) + 'px',
						height: Math.round(scaleY * $imgH) + 'px',
						marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px',
						marginTop: '-' + Math.round(scaleY * selection.y1) + 'px'
					});

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS