Closed dlaynes closed 10 years ago
I solved this problem using events:
var options = {}; //some options
jcrop_api = jQuery.Jcrop('#crop-me', options);
//...
jcrop_api.setSelect([0,0,w,h]);
jcrop_api.setOptions({
allowSelect: false,
aspectRatio: page_max_width / page_max_height,
onChange: function(coords){
if(coords.w < page_max_width || coords.h < page_max_height){
jcrop_api.setSelect([coords.x,coords.y,coords.x+page_max_width,coords.y+page_max_height]);
}
}
});
Hi, I was wondering if Jcrop allows you to restrict the minimun size of the selectable area, or if you can control this using events. Thanks a lot for your response.