As the image I linked in the end of this post shows; there is two
croppers on top of the same image.
When I change the images' source I have to remove the cropper and set
it again with different ratio/minWidth/minHeight. Sometimes when I
change image two cropper tools appear on top of the image.
Only one of the tools can set cords and dimensions but the other one
still appears and can be tweeked as if that tool still is in use.
I have tried numeral ways but can't get it to work.
I save my class in a var called "cropClass", when I change the image I
use "cropClass.remove();" but that didn't to the trick. I then tried
all bunch of things including the code blow:
function setCrop(settings)
{
if(cropClass !== null)
{
cropClass.reset();
cropClass.remove();
cropClass = null;
$$('#activeCoords > input').each(function(elm)
{ elm.setValue('0'); });
}
cropClass = crop(settings);
}
Two cropper tools on the same image:
http://i51.tinypic.com/2zhfhok.png