OSDN Git Service

Version 0.6.96. add lock function @X.EventDispatcher.
[pettanr/clientJs.git] / 0.6.x / js / 05_net / 04_XNetImage.js
index 94eae12..84d200d 100644 (file)
@@ -7,7 +7,7 @@
  */\r
 \r
 var X_Net_Image_hasImage  = !!window[ 'Image' ],\r
-       X_Net_Image_image     = X_Net_Image_hasImage && new window[ 'Image' ](),\r
+       X_Net_Image_image     = X_Net_Image_hasImage && new Image(),\r
        X_Net_Image_isElement = X.Type.isHTMLElement( X_Net_Image_image );\r
        \r
 \r
@@ -60,7 +60,7 @@ X_NET_ImageWrapper = ( !X_Net_Image_isElement ? X.EventDispatcher : X.Dom.Node )
                                        if( this.finish ) return;\r
                                        this.finish  = true;\r
                                        this.timerID && X.Timer.remove( this.timerID );\r
-                                       this.timerID = this.asyncDispatch( 0, { type : X.Event.ERROR } );\r
+                                       this.timerID = this.asyncDispatch( { type : X.Event.ERROR } );\r
                                        break;\r
                                case 'load' :\r
                                // if( finish === true ) return; // これがあると firefox3.6 で駄目、、、\r
@@ -68,11 +68,11 @@ X_NET_ImageWrapper = ( !X_Net_Image_isElement ? X.EventDispatcher : X.Dom.Node )
                                        this.finish = true;\r
                                        this.timerID && X.Timer.remove( this.timerID );\r
                                        if( X.UA.Opera && !this._rawObject.complete ){\r
-                                               this.timerID = this.asyncDispatch( 0, { type : X.Event.ERROR } );\r
+                                               this.timerID = this.asyncDispatch( { type : X.Event.ERROR } );\r
                                                return;\r
                                        };\r
                                        size = X.Dom.Image.getActualDimension( !X_Net_Image_isElement ? this.abspath : this );\r
-                                       this.timerID = this.asyncDispatch( 0, {\r
+                                       this.timerID = this.asyncDispatch( {\r
                                                type : X.Event.SUCCESS,\r
                                                src  : this.abspath,\r
                                                w    : size[ 0 ],\r
@@ -83,7 +83,7 @@ X_NET_ImageWrapper = ( !X_Net_Image_isElement ? X.EventDispatcher : X.Dom.Node )
                                case X.Event.ERROR :\r
                                case X.Event.TIMEOUT :\r
                                        this.timerID && X.Timer.remove( this.timerID );\r
-                                       this.timerID = this.asyncDispatch( 0, X.Event.COMPLETE );\r
+                                       this.timerID = this.asyncDispatch( X.Event.COMPLETE );\r
                                        break;\r
                                case X.Event.KILL_INSTANCE :\r
                                        this.reset();\r
@@ -98,12 +98,12 @@ X_NET_ImageWrapper = ( !X_Net_Image_isElement ? X.EventDispatcher : X.Dom.Node )
                                this.finish = true;\r
                                if( this._rawObject.width ) return;\r
                                X.Timer.remove( this.timerID );\r
-                               this.timerID = this.asyncDispatch( 0, X.Event.ERROR );\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
-                               this.timerID = this.asyncDispatch( 0, X.Event.TIMEOUT );\r
+                               this.timerID = this.asyncDispatch( X.Event.TIMEOUT );\r
                        };\r
                },\r
                cancel : function(){\r