Closed piotrekmonko closed 9 years ago
Hey Peter,
using the FileReader API to make the cropping widget even more flexible definitely looks interesting, but I really could use an extended example to see the bigger picture.
If i get it correctly, boxWidth
and boxHeight
rescale the image to the given dimensions.
Here we should check how to best sync the behaviour with the thumbnail creation which is currently done by the cropping widget. Essentially IMAGE_CROPPING_THUMB_SIZE
already defines the desired box, so if we pass this through (instead), the new extra parameters probably shouldn't even be necessary.
I think it would help a lot if you could extend the example app with a working demo of using the FileReader API so things are somewhat easier to discuss.
Making it possible to optionally prevent the inclusion of IMAGE_CROPPING_JQUERY_URL is a great idea and should help with issues such as #45
Regarding the accessibility of the Jcrop API: Shouldn't it be sufficient to keep the jcrop
var in the scope of our image cropping function and simply export it (next to our init function), so it is accessible to the outside as image_cropping.jcrop
?
Hey @piotrekmonko , I've been using your version of this library as I use the FileReader API to show an instant preview of the cropping image on the browser without posting to the server. Everything seems to be working good except that the cropping parameters are not correct when I reset the image with setImage. Do you have any code examples you could share of your usage?
Thanks, Jon
I am closing this, as the proposed changes are now merged.
It would be great to enhance the default cropping widget in one of the next releases, so that cropping via the FileReader API becomes the new standard and we just fall back to the traditional method on older browsers.
If you already have a working implementation, feel free to send a PR.
Hi jonasundderwolf.
Great piece of code you have there, bravo and many thanks for your work. Perhaps you'd be interested in my fork? Changelog:
Updated doc to reflect these.
Again, thank you for your work, you're great.
Cheers, Peter