OSDN Git Service

Version 0.6.134, add comments for closure compiler.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 20_PageRoot.js
index 915ec07..16521e3 100644 (file)
@@ -9,7 +9,7 @@ function X_UI_eventRellay( e ){
                i       = 0,
                data    = X_UI_rootData,
                sysOnly = false,
-               ret     = X.Callback.NONE,
+               ret     = X_Callback_NONE,
                list, parent, _ret;
 
        // mouseup で alert を出すと mouseleave が発生、ということでイベント中のイベント発火を禁止
@@ -22,21 +22,21 @@ function X_UI_eventRellay( e ){
        
        e.type = type;
 
-       if( data && ( data = data.monopolyNodeData ) && ( ret = data.dispatch( e ) ) & X.Callback.MONOPOLY ){
+       if( data && ( data = data.monopolyNodeData ) && ( ret = data[ 'dispatch' ]( e ) ) & X_Callback_MONOPOLY ){
                X_UI_eventBusy = false;
-               return ret | X.Callback.PREVENT_DEFAULT;
+               return ret | X_Callback_PREVENT_DEFAULT;
        };
        
        list = X_UI_rootData.hoverList;
        ( X_UI_rootData.targetNodeData = X_UI_rootData ).capcher( x, y );
        data = X_UI_rootData.targetNodeData;
 
-       //data !== X_UI_rootData && console.log( data.xnode.text() );
+       //data !== X_UI_rootData && console.log( data.xnode[ 'text' ]() );
 
        while( data ){
-               _ret = data.dispatch( e, sysOnly );
+               _ret = data[ 'dispatch' ]( e, sysOnly );
                ret |= _ret;
-               if( _ret & X.Callback.MONOPOLY || _ret & X.Callback.STOP_PROPAGATION || _ret & X.Callback.STOP_NOW ) break; // sysOnly = true;
+               if( _ret & X_Callback_MONOPOLY || _ret & X_Callback_STOP_PROPAGATION || _ret & X_Callback_STOP_NOW ) break; // sysOnly = true;
                data = data.parentData;
        };
        
@@ -46,20 +46,20 @@ function X_UI_eventRellay( e ){
                        parent = parent.parentData;
                };
                if( parent !== X_UI_rootData ){
-                       data.hoverClassName && data.xnode.removeClass( data.hoverClassName );
-                       data._listeners && data._listeners[ X.UI.Event.POINTER_OUT ] && data.dispatch( e, X.UI.Event.POINTER_OUT, false ); // new Event
+                       data.hoverClassName && data.xnode[ 'removeClass' ]( data.hoverClassName );
+                       data._listeners && data._listeners[ X.UI.Event.POINTER_OUT ] && data[ 'dispatch' ]( e, X.UI.Event.POINTER_OUT, false ); // new Event
                        delete data.hovering;
                        list.splice( i, 1 );
                        continue;
                };
                if( !data.hovering ){
                        data.hoverClassName && data.xnode.addClassName( data.hoverClassName );
-                       data._listeners && data._listeners[ X.UI.Event.POINTER_IN ] && data.dispatch( e, X.UI.Event.POINTER_IN, true ); // new Event
+                       data._listeners && data._listeners[ X.UI.Event.POINTER_IN ] && data[ 'dispatch' ]( e, X.UI.Event.POINTER_IN, true ); // new Event
                        data.hovering = true;
                };
        };
        X_UI_eventBusy = false;
-       return ret | X.Callback.PREVENT_DEFAULT;
+       return ret | X_Callback_PREVENT_DEFAULT;
 };
 
 /*
@@ -83,12 +83,12 @@ X.UI._PageRoot = X.UI._Box.inherits(
                cursorStyle           : null,
                
                Constructor : function( layout, args ){
-                       this.Super( layout, args );
+                       this[ 'Super' ]( layout, args );
                        
-                       if( X_ViewPort_readyState === X_Event.XDOM_READY ){
-                               X.Timer.once( 0, this, this.start );
+                       if( X_ViewPort_readyState === X_EVENT_XDOM_READY ){
+                               X_Timer_once( 0, this, this.start );
                        } else {
-                               X.ViewPort.listenOnce( X_Event.XDOM_READY, this, this.start );
+                               X.ViewPort[ 'listenOnce' ]( X_EVENT_XDOM_READY, this, this.start );
                        };
                        
                        this.hoverList    = [];
@@ -99,7 +99,7 @@ X.UI._PageRoot = X.UI._Box.inherits(
                
                start : function(){
                        this.initialize( this.User, this, null, null );
-                       X.Timer.once( 0, this, this.addToView );
+                       X_Timer_once( 0, this, this.addToView );
                },
                addToView : function(){
                        var     counter = this.eventCounter, flg;
@@ -114,34 +114,34 @@ X.UI._PageRoot = X.UI._Box.inherits(
                        } );
                        
                        // hover や rollover rollout のための move イベントの追加
-                       this.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ X.UI.Event._POINTER_MOVE ], X_UI_eventRellay );
+                       this.xnodeInteractiveLayer[ 'listen' ]( X.UI.Event.IdToName[ X.UI.Event._POINTER_MOVE ], X_UI_eventRellay );
                        if( counter[ X.UI.Event._POINTER_MOVE ] ){
                                ++counter[ X.UI.Event._POINTER_MOVE ];
                        } else {
                                counter[ X.UI.Event._POINTER_MOVE ] = 1;
                        };
 
-                       X.Timer.once( 0, this, this.afterAddToView );
+                       X_Timer_once( 0, this, this.afterAddToView );
                },
                afterAddToView : function(){
-                       this.xnode.className( 'PageRoot' );
+                       this.xnode[ 'className' ]( 'PageRoot' );
                        
                        this.creationComplete();
-                       X.Timer.once( 0, this, this.doFirstCalc );
+                       X_Timer_once( 0, this, this.doFirstCalc );
                },
                
                doFirstCalc : function(){
                        this.calculate();
                        this.phase = 4;
                        X.ViewPort
-                               .listen( X_Event.VIEW_RESIZED, this, this.calculate )
-                               .listen( X_Event.BASE_FONT_RESIZED, this, this.calculate );
+                               [ 'listen' ]( X_EVENT_VIEW_RESIZED, this, this.calculate )
+                               [ 'listen' ]( X_EVENT_BASE_FONT_RESIZED, this, this.calculate );
                },
                
                reserveCalc : function(){
                        if( this.calcReserved === false ){
                                this.calcReserved = true;
-                               X.Timer.once( 0, this, this.calculate );
+                               X_Timer_once( 0, this, this.calculate );
                        };
                },
                calculate : function( e ){
@@ -158,7 +158,7 @@ X.UI._PageRoot = X.UI._Box.inherits(
                },
                
                _remove : function(){
-                       this.xnodeInteractiveLayer.unlisten();
+                       this.xnodeInteractiveLayer[ 'unlisten' ]();
                        _Box.prototype._remove.call( this );
                }
        }