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

Wrong selection, when default selection style set, but you trying manual cropping #92

Open AndrewFall opened 6 years ago

AndrewFall commented 6 years ago

selection-bug

-        minWidth = round(options.minWidth / scaleX) || 0;
-        minHeight = round(options.minHeight / scaleY) || 0;
+        minWidth = round(min((options.minWidth / scaleX) || 0, imgWidth));
+        minHeight = round(min((options.minHeight / scaleY) || 0, imgHeight));
AndrewFall commented 6 years ago

I needed to apply this patch to make library work on customer site