Hi

My settings:
css aggregation on
custom form with image:
instant crop and instant preview on
inline crop off (i use an overlay)

Problem: Sometimes after image upload, the preview is too big and covers part of the image to crop (screen attached).

Reason:
manualcrop.js and manualcrop.css files are being attached to site just after image upload (function _manualcrop_attach_files in manualcrop.helpers.inc). manualcrop.js may execute before css is fully loaded and since it calculates images dimensions basing on css, it goes wrong.

After site refresh everything works fine - css file is in browser cache.

Temporary solution: I copied manualcrop.css styles to my styles so they are always available for js - no problem anymore.
But there should be some checking for css existence in js file

Comments

sgurlt’s picture

StatusFileSize
new2.7 KB

I ran into the same issue and wrote a little patch for it. Please review and let me know what you think.

sgurlt’s picture

Status: Active » Needs review
matysek145’s picture

Unfortunately doesn't work for me. I patched files and removed css that i had copied before, but after every browser cache clearing i still have the issue.

sgurlt’s picture

Hmm thats strange, did you patch against latest dev release?

matysek145’s picture

Hi, i patched against 7.1.4+121 dev release and didn't work (i believe it must have been some of the newest release, but i can't find information about the release day of this version :x).
When i tried to patch the latest one (7.15+0 dev) i couldn't do this beacuse of some fails
Anyway i tried to patch 7.14+121 dev again, but with the same results as before