I'm currently setting up an image-upload cropping sequence.
The application requires an enforced minimum size, however this results in awkward JCrop behavior:
- Clicking without dragging produces nothing.
- Clicking & slightly dragging produces instantly a selection of the minimum height.
One potential solution would solve the above problems:
- Interface opens with a default selection.
- The selection cannot be de-selected.
JCrop has built-in functionality for a default selection, however I haven't yet identified a built-in configuration / behavior to prevent deselection.
Attempts so far -
I've tried this route
$.Jcrop.defaults.onRelease = function(e) {
e.preventDefault();
e.stopPropagation();
}
I've also tried modifying the plugin's source in several places, in order to short-circuit the functions which (perhaps) carry out the de-selection, by return
ing at the opening of these function definitions:
doneSelect
Selection.release
Selection.done
...without the desired result.
Any tips?