tapmodo/Jcrop — pull request #92 by kipruss (2013-04-19 23:59:34+00:00)
Title: Improving a function `presize` using new parameter `photoRealSize`

Hello.

In our current project we faced with the problem: our cropped image had css property `width` and the function `presize` could not properly count a real width of the image. Therefore, scale parameters also was incorrect (in our case they equals 1 instead of a value about 4).

I added a new parameter `photoRealSize` for improving the `presize` function.

Look the commit. For example, we used this parameter like this:

```coffeescript
@.initCrop = ->
img = new Image()
img.onload = ->
w = @width
h = @height

$("#img").Jcrop {
boxWidth : 600
aspectRatio: 4.0/3
bgOpacity: 0.3
photoRealSize: [w, h]
minSize: [200, 150]
addClass: 'jcrop-dark'
onSelect: setCoords
}, ->
setBounds(@)
return

return

img.src = $("#img").attr("src")
return
```

If this parameter will not be specified, we will have old behavior of the function `presize`.

Thank you for your job!