I'm using the imgarearesize plugin with the FileReader API to take an image, populate a bootstrap modal, allow users to edit it and then show it in a preview on the original page.I'm using this code to show the preview:\[code\]function preview(img, selection) { var scaleX = 100 / (selection.width || 1); var scaleY = 100 / (selection.height || 1); $('#ferret + div > img').css({ width: Math.round(scaleX * 400) + 'px', height: Math.round(scaleY * 300) + 'px', marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px', marginTop: '-' + Math.round(scaleY * selection.y1) + 'px' });}\[/code\]If I change the 400 and 300 values to dynamically match what is pulled in from the filereader API, it appears all janky.Is this a good way to be doing this? Is the fact that sometimes my bootstrap modal will scale the users image down a problem?