|
|
var height = this.data.height;
window.preview_timer = setInterval(function()
{
if ($('main_image').height < height)
{
$('main_image').width += 20;
}
else
{
clearInterval(window.preview_timer);
}
}, 1);
window.preview_timer = setInterval(function()
{
if ($('main_image').height > 360)
{
$('main_image').width -= 20;
}
else
{
clearInterval(window.preview_timer);
}
}, 1);
if (!window.cropper)
{
window.cropper = new Cropper.Img('main_image', { onEndCrop: function(coords, dimensions)
{
window.cropper_info = {coords: coords, dimensions: dimensions};
} });
}
if (window.cropper)
{
$MQ('r:photo.crop.request', window.cropper_info);
}
if (window.cropper)
{
window.cropper.remove();
window.cropper = 0;
}
|