* Opera7 では毎回 image を作る必要あり、src が異なればOK?\r
*/\r
X_NET_ImageWrapper = X_Class_override(\r
- !X_Net_Image_isElement ? new X.EventDispatcher( X_Net_Image_image ) : new X.Node( X_Net_Image_image ),\r
+ !X_Net_Image_isElement ? X_EventDispatcher( X_Net_Image_image ) : Node( X_Net_Image_image ),\r
{\r
\r
_busy : false,\r
this.delay = data.delay || 100;\r
this.timeout = data.timeout || 5000;\r
\r
- this._rawObject.src = this.abspath;\r
+ this[ '_rawObject' ].src = this.abspath;\r
\r
- if( X_UA[ 'Opera7' ] && this._rawObject.complete ){\r
- this.asyncDispatch( 'load' );\r
+ if( X_UA[ 'Opera7' ] && this[ '_rawObject' ].complete ){\r
+ this[ 'asyncDispatch' ]( 'load' );\r
} else {\r
- this.timerID = X.Timer.add( this.delay, 0, this, this._detect );\r
+ this.timerID = X_Timer_add( this.delay, 0, this, this._detect );\r
};\r
},\r
\r
if( this.finish ) return;\r
this._busy = false;\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
+ this.timerID && X_Timer_remove( this.timerID );\r
+ this.timerID = this[ 'asyncDispatch' ]( /*e.type === 'error' ?*/ X_EVENT_ERROR /*: X_EVENT_CANCELED*/ );\r
break;\r
case 'load' :\r
// if( finish === true ) return; // これがあると firefox3.6 で駄目、、、\r
// if( timer ) return; // これがあると safari3.2 で駄目、、、\r
this._busy = false;\r
this.finish = true;\r
- this.timerID && X.Timer.remove( this.timerID );\r
- if( X_UA[ 'Opera' ] && !this._rawObject.complete ){\r
- this.timerID = this.asyncDispatch( X_Event.ERROR );\r
+ this.timerID && X_Timer_remove( this.timerID );\r
+ if( X_UA[ 'Opera' ] && !this[ '_rawObject' ].complete ){\r
+ this.timerID = this[ 'asyncDispatch' ]( X_EVENT_ERROR );\r
return;\r
};\r
size = X.Util.Image.getActualDimension( !X_Net_Image_isElement ? this.abspath : this );\r
- this.timerID = this.asyncDispatch( {\r
- type : X_Event.SUCCESS,\r
+ this.timerID = this[ 'asyncDispatch' ]( {\r
+ type : X_EVENT_SUCCESS,\r
src : this.abspath,\r
w : size[ 0 ],\r
h : size[ 1 ]\r
// TODO feedback net speed\r
- // time , this._rawObject.fileSize\r
+ // time , this[ '_rawObject' ].fileSize\r
} );\r
break;\r
- case X_Event.KILL_INSTANCE :\r
+ case X_EVENT_KILL_INSTANCE :\r
this.reset();\r
!X_Net_Image_hasImage && this.destroy(); // if xnode\r
break;\r
\r
_detect : function(){\r
if( this.finish ) return;\r
- if( this._rawObject && this._rawObject.complete ){\r
+ if( this[ '_rawObject' ] && this[ '_rawObject' ].complete ){\r
this._busy = false;\r
this.finish = true;\r
- if( this._rawObject.width ) return;\r
- X.Timer.remove( this.timerID );\r
- this.timerID = this.asyncDispatch( X_Event.ERROR );\r
+ if( this[ '_rawObject' ].width ) return;\r
+ X_Timer_remove( this.timerID );\r
+ this.timerID = this[ 'asyncDispatch' ]( X_EVENT_ERROR );\r
} else\r
if( this.timeout < ( this.tick += this.delay ) ){\r
this._busy = false;\r
this.finish = true;\r
- X.Timer.remove( this.timerID );\r
- this.timerID = this.asyncDispatch( X_Event.TIMEOUT );\r
+ X_Timer_remove( this.timerID );\r
+ this.timerID = this[ 'asyncDispatch' ]( X_EVENT_TIMEOUT );\r
};\r
},\r
\r
cancel : function(){\r
// abort がある?\r
- this._rawObject && this._rawObject.abort && this._rawObject.abort();\r
- // this._rawObject.src = '';\r
+ this[ '_rawObject' ] && this[ '_rawObject' ].abort && this[ '_rawObject' ].abort();\r
+ // this[ '_rawObject' ].src = '';\r
this._busy = false;\r
this.finish = true;\r
- this.asyncDispatch( X_Event.CANCELED );\r
+ this[ 'asyncDispatch' ]( X_EVENT_CANCELED );\r
},\r
\r
reset : function(){\r
- this.timerID && X.Timer.remove( this.timerID );\r
- //X_Net_Image_isElement ? this._rawObject.removeAttribute( 'src' ) : ( this._rawObject.src = '' );\r
- this._rawObject.src = '';\r
+ this.timerID && X_Timer_remove( this.timerID );\r
+ //X_Net_Image_isElement ? this[ '_rawObject' ].removeAttribute( 'src' ) : ( this[ '_rawObject' ].src = '' );\r
+ this[ '_rawObject' ].src = '';\r
this.timerID = 0;\r
this._busy = false;\r
this.finished = false;\r
}\r
);\r
\r
-X_NET_ImageWrapper.listen( [ 'load', 'error' /*, 'abort'*/, X_Event.KILL_INSTANCE ] );\r
+X_NET_ImageWrapper[ 'listen' ]( [ 'load', 'error' /*, 'abort'*/, X_EVENT_KILL_INSTANCE ] );\r
\r
-// X_Net_Image_isElement && X_NET_ImageWrapper.appendTo( X.X_Node_systemNode );\r
+// X_Net_Image_isElement && X_NET_ImageWrapper[ 'appendAt' ]( X.X_Node_systemNode );\r