Preview Image stop to work when a ImageField is added
sebas5384 - August 5, 2009 - 05:09
| Project: | Imagefield Crop |
| Version: | 6.x-1.0-beta3 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
Description
First of all, sorry about my English :P
I use ImageField with ImageField Insert, and generally I use it in the "Unlimited" mode, so when I add a new ImageField Insert, happends that the Preview image of the ImageField Crop stop to work.
Doing some debugg, and I found that on the html, before the image(the preview) was an with some settings about, the thing is that when I add a new ImageField Insert loose that setting, and when you move the crop area it try to update the position of the Preview image gives me an undefined error.
Thanks :D
Again sorry about my English, ;)
| Attachment | Size |
|---|---|
| imageField_bug.png | 206.73 KB |

#1
So I it's not the best solution, but it's working now :D
Now i use the "ImageField Crop for Multiple", so these it's going to be for that one, and not the last stable.
No arquivo: imagefield_crop.js
function showPreview(c) {
-
+ // Check if someone rewrite the Drupal.settings
+ if (Drupal.settings.imagefield_crop[this.fieldName][this.delta].preview == undefined) {
+ eval($(this.wrapperId + ' .jcrop-preview-wrapper').prev().html());
+ }
+
var rx = Drupal.settings.imagefield_crop[this.fieldName][this.delta].preview.width / c.w;
var ry = Drupal.settings.imagefield_crop[this.fieldName][this.delta].preview.height / c.h;
If someone have some another way to resolve these problem, please let as know!
Thanxs.
#2
#3
This error also happens to me.
When I edit the node, the preview image shows the upper left corner of the original image.
In dev version 6.x-1.x-dev (2009-Nov-04) also happens, without the "ImageField Crop for Multiple" patchs.
What solution could there be?