When I set the output resolution to 0, in order to not scale the image after cropping, it produces the following error on the edit page:
Syntax error : Drupal.imagefield_crop = { ratio : }
I looked into the code a bit and this seems logical as in the file imagefield_crop_widget.inc around line 125 we find the following:
list($w, $h) = explode('x', $field['widget']['resolution']);
// ratio is zero when not enforced
$ratio = $field['widget']['enforce_ratio'] * $w/$h;
The list command assigns $w to 0 but $h is set to NULL, so the resulting $ratio is undefined.
I "fixed" this by adding the following line of code right after the list command: $h = ($h==NULL)?1:$h;
This way the cropping works, but there's no preview shown (although the space where the preview should be is there).
Comments
Comment #1
yhager commentedFixed on 6.x-1.0-beta1.
Comment #2
yhager commented