OSDN Git Service

Version 0.6.133, fix for closure compiler - ADVANCED_OPTIMIZATIONS
[pettanr/clientJs.git] / 0.6.x / js / 06_net / 04_XNetImage.js
index 8cca132..38a878b 100644 (file)
@@ -9,7 +9,7 @@
 var X_Net_Image_hasImage  = !!window[ 'Image' ],\r
        X_Net_Image_image     = X_Net_Image_hasImage && new Image(),\r
        // IE では厳密には HTMLImageElement ではなく、appendChild してもサイズが取れず、removeChild に失敗する\r
-       X_Net_Image_isElement = !( X_UA.IE < 9 ) && X.Type.isHTMLElement( X_Net_Image_image );\r
+       X_Net_Image_isElement = !( X_UA[ 'IE' ] < 9 ) && X_Type_isHTMLElement( X_Net_Image_image );\r
        \r
 \r
 if( !X_Net_Image_hasImage ){\r
@@ -46,7 +46,7 @@ X_NET_ImageWrapper = X_Class_override(
 \r
                        this._rawObject.src = this.abspath;\r
 \r
-                       if( X_UA.Opera7 && this._rawObject.complete ){\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
@@ -62,7 +62,7 @@ X_NET_ImageWrapper = X_Class_override(
                                        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 = this.asyncDispatch( /*e.type === 'error' ?*/ X_Event.ERROR /*: X_Event.CANCELED*/ );\r
                                        break;\r
                                case 'load' :\r
                                // if( finish === true ) return; // これがあると firefox3.6 で駄目、、、\r
@@ -70,13 +70,13 @@ X_NET_ImageWrapper = X_Class_override(
                                        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
+                                       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
+                                               type : X_Event.SUCCESS,\r
                                                src  : this.abspath,\r
                                                w    : size[ 0 ],\r
                                                h    : size[ 1 ]\r
@@ -84,7 +84,7 @@ X_NET_ImageWrapper = X_Class_override(
                                                // 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
@@ -98,13 +98,13 @@ X_NET_ImageWrapper = X_Class_override(
                                this.finish = true;\r
                                if( this._rawObject.width ) return;\r
                                X.Timer.remove( this.timerID );\r
-                               this.timerID = this.asyncDispatch( X.Event.ERROR );\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
+                               this.timerID = this.asyncDispatch( X_Event.TIMEOUT );\r
                        };\r
                },\r
                \r
@@ -114,7 +114,7 @@ X_NET_ImageWrapper = X_Class_override(
                        // 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
@@ -129,6 +129,6 @@ X_NET_ImageWrapper = X_Class_override(
        }\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