odyniec / imgareaselect

ImgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement image cropping functionality, as well as other user interface features, such as photo notes (like those on Flickr).
http://odyniec.net/projects/imgareaselect/
686 stars 197 forks source link

Selected image constraints #4

Closed loa closed 13 years ago

loa commented 13 years ago

Implemented the missing feature I proposed in Issue #3.

Basically I added minImgWidth, minImgHeight, maxImgWidth, maxImgHeight. With these you can restrict the selected image area instead of restricting the dimensions of the Selection Area. This way you can handle crop with min & max requirements on scaled images.

Hope you find it helpfull :)

WRidder commented 13 years ago

This feature will come in handy for me! Hope it makes it into the next release :)

loa commented 13 years ago

It seems odyniec will, but probably change the existing minWidth, minHeight, max... etc to be scaled instead. I didn't want to change the behavior of the existing ones cause I thought it might be intended so I added those four instead.

More on this in issue #3

odyniec commented 13 years ago

The min/max options now properly handle scaled images.