X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F06_net%2F04_XNetImage.js;h=853ec82edfc6d0e19bc78683480b381da09307fc;hb=dd02887497fa95f13d112b7fc2e5e7aefd0ffb08;hp=6a90a4659b0b7cd5c20d1f3f9685377d2bf86fa3;hpb=7f26e99d39211b5749c4ad62a84855404c7390a3;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/06_net/04_XNetImage.js b/0.6.x/js/06_net/04_XNetImage.js index 6a90a46..853ec82 100644 --- a/0.6.x/js/06_net/04_XNetImage.js +++ b/0.6.x/js/06_net/04_XNetImage.js @@ -43,24 +43,15 @@ X_NET_ImageWrapper = X_Class_override( this.abspath = X.URL.toAbsolutePath( data.url ); this.delay = data.delay || 100; this.timeout = data.timeout || 5000; - this.timerID = X.Timer.add( this.delay, 0, this, this._detect ); - - //X_Net_Image_hasImage ? ( this._rawObject.src = this.abspath ) : this.attr( 'src', this.abspath ); - /* - if( X_UA.Opera7 ){ - X_EventDispatcher_toggleAllEvents( this, false ); - this._rawObject = new Image(); - X_EventDispatcher_toggleAllEvents( this, true ); - }; */ - + //this.timerID = X.Timer.add( this.delay, 0, this, this._detect ); + this._rawObject.src = this.abspath; - //alert( this._rawObject.src + ' ' + this._rawObject.complete ); + if( X_UA.Opera7 && this._rawObject.complete ){ this.asyncDispatch( 'load' ); } else { this.timerID = X.Timer.add( this.delay, 0, this, this._detect ); }; - //alert( this._rawObject.src + ' ' + this._rawObject.complete ); }, handleEvent : function( e ){ @@ -119,6 +110,7 @@ X_NET_ImageWrapper = X_Class_override( cancel : function(){ // abort がある? this._rawObject && this._rawObject.abort && this._rawObject.abort(); + // this._rawObject.src = ''; this._busy = false; this.finish = true; this.asyncDispatch( X.Event.CANCELED );