X_ImgLoader_isElement = !( X_UA[ 'IE' ] < 9 ) && X_Type_isHTMLElement( X_ImgLoader_image ),\r
// http://uupaa.hatenablog.com/entry/2013/12/17/171809\r
// お手軽に画像の読み込みをハンドリングする、今どきな方法\r
- X_ImgLoader_0forError = !X_UA[ 'IE' ] || X_UA[ 'IE' ] === 11;\r
+ X_ImgLoader_0forError = !X_UA[ 'IE' ] || X_UA[ 'IE' ] === 11 || X_UA[ 'IEHost' ] === 11;\r
\r
/*\r
* TODO\r
},\r
\r
reset : function(){\r
- console.log( 'X.Net.Image:reset ' + this.abspath + ' timerID:' + this.timerID );\r
+ //console.log( '/ X.Net.Image:reset ' + this.abspath + ' timerID:' + this.timerID );\r
\r
this.timerID && X_Timer_remove( this.timerID );\r
this.timerID = 0;\r
\r
+ this.finish = false;\r
+ this.abspath = ''; \r
//X_ImgLoader_isElement ? this[ '_rawObject' ].removeAttribute( 'src' ) : ( this[ '_rawObject' ].src = '' );\r
this[ '_rawObject' ].src = '';\r
- this.finish = false;\r
- this.abspath = '';\r
+ \r
+ //console.log( '\ X.Net.Image:reset ----------- *' );\r
}\r
};\r
\r
\r
if( raw && raw.complete ){\r
this.finish = true;\r
- console.log( 'X.Net.Image:detect ' + raw.width );\r
+ //console.log( 'X.Net.Image:detect ' + raw.width );\r
if( raw.width ) return;\r
X_Timer_remove( this.timerID );\r
+ //console.log( '* X.Net.Image:ERROR @detect(1) ' + this.abspath );\r
this.timerID = this[ 'asyncDispatch' ]( X_EVENT_ERROR );\r
} else\r
if( this.timeout < ( this.tick += this.delay ) ){\r
this.finish = true;\r
X_Timer_remove( this.timerID );\r
+ //console.log( '* X.Net.Image:ERROR @detect(2) ' + this.abspath );\r
this.timerID = this[ 'asyncDispatch' ]( { type : X_EVENT_ERROR, 'timeout' : true } );\r
};\r
};\r
\r
// IE11 reset() 時にここに入ってくる...\r
if( !this.abspath ) return;\r
- console.log( 'X.Net.Image:handleEvent ' + e.type );\r
+ //console.log( 'X.Net.Image:handleEvent ' + e.type );\r
\r
switch( e.type ){\r
case 'error' :\r
- //case 'abort' : // TODO ??\r
// ie11(10,9 開発モード)で mineType 不正の場合、画像取得に成功してもエラーイベントが起こるのを無視する。\r
if( X_ImgLoader_0forError && raw.width ) return;\r
if( this.finish ) return;\r
this.finish = true;\r
this.timerID && X_Timer_remove( this.timerID );\r
- this.timerID = this[ 'asyncDispatch' ]( /*e.type === 'error' ?*/ X_EVENT_ERROR /*: X_EVENT_CANCELED*/ );\r
+ //console.log( '* X.Net.Image:ERROR @handle ' + this.abspath + X.Timer.now() );\r
+ //console.dir( raw );\r
+ this.timerID = this[ 'asyncDispatch' ]( this.timeout, X_EVENT_ERROR );\r
break;\r
\r
case 'load' :\r
return;\r
};\r
\r
+ //console.log( '* X.Net.Image:LOAD @handle ' + this.abspath + X.Timer.now() );\r
+ //console.dir( raw );\r
+ \r
size = X_Util_Image_getActualDimension( !X_ImgLoader_isElement ? this.abspath : this );\r
this.timerID = this[ 'asyncDispatch' ]( {\r
'type' : X_EVENT_SUCCESS,\r