youmoula / jcrop

Automatically exported from code.google.com/p/jcrop
0 stars 0 forks source link

Jcrop not initializing #93

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upload picture (via post form and php)
2. A window (with Easyui framework) is loaded with the image to crop to a fixed 
size

What is the expected output? What do you see instead?
Only the first time that the window loads jcrop won't initialize, but if you 
close the window (which is a div with it's contest loaded via ajax) and reopen 
it (same parameters) jcrop works fine.
The expected result is to have the cropbox working on the first attempt...
Additionally, when jcrop doesn't initialize other scripts (not all) won't work 
either (for example a refresh button with the specifications of Easyui to 
refresh the window)
What version of the product are you using? On what operating system?
- Jcrop 0.9.12
- jquery 2.x
- PHP server running on windows.

Please provide any additional information below.
I've already tried every other solution offered:
- settimeout to avoid loading time of the picture.
- preloading image with an object
- caching image before loading page
- using onload callback
- using callback of jcrop
- setinterval to create the object a certain number of times.

The page is to manage a gallery for a site, every time an image is uploaded, or 
cropped my script renames the file to avoid cache... and the problem presents 
always the first time the image is uploaded, for example, I upload the picture 
the first time... jcrop won't work... if I close the window and use the same 
function to call the window again, jcrop will work with no problem... It's not 
an issue caused by the loading time of the picture, I even tried adding a 
function to create the jcrop object on a button to avoid the problem of loading 
time. the first time it wont work, but the next will work correctly. when the 
issue is present even the tutorial to destroy and re-enable jcrop won't work.

Original issue reported on code.google.com by ektoer.a...@gmail.com on 5 Nov 2013 at 5:55