Ext.onReady(function() {
var win = new Ext.Window({
width : 1465,
height: 785,
id : 'autoload-win',
autoScroll : true,
html: '<div id="generateImage"><img id="target" alt="generateImg" height="{height}" width="{width}" /></div>',
listeners:{
resize: function (panel, w,h){
*!*
$("#target").one('load', loadCallback).attr('src', adresse).each(function () {
if (this.complete) $(this).trigger('load');
});
*/!*
}
}
});
win.show();
$("#target").one('load', loadCallback).attr('src', adresse).each(function () {
if (this.complete) $(this).trigger('load');
});
$('#target').imgAreaSelect({
handles: true,
movable: false,
resizable: false,
autoHide: true,
onSelectEnd: function (img, selection) {
$("#target").one('load', loadCallback).attr("src", adresse + "&x1=" + selection.x1 + "&y1=" + selection.y1 + "&width=" + selection.width + "&height=" + selection.height).each(
function () {
if ($("#target").complete)
$("#target").trigger('load');
});
}
});
});
?