bfr
No notes
Syntax:
JavaScript
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' });