OSDN Git Service

Version 0.6.114, add AudioSprite, etc.
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 20_PageRoot.js
index b13f170..fd84be3 100644 (file)
@@ -1,6 +1,6 @@
 
 X.UI._eventRellay = function( e ){
-       var font    = X.Dom.getBaseFontSize(),
+       var font    = X.ViewPort.getBaseFontSize(),
                x       = e.clientX / font,
                y       = e.clientY / font,
                type    = X.UI.Event.NameToID[ e.type ],
@@ -83,12 +83,12 @@ X.UI._PageRoot = X.UI._Box.inherits(
                _eventBusy            : false,
                
                Constructor : function( layout, args ){
-                       this.SuperConstructor( layout, args );
+                       this.Super( layout, args );
                        
-                       if( X_Dom_readyState === X.Event.XDOM_READY ){
+                       if( X_ViewPort_readyState === X.Event.XDOM_READY ){
                                X.Timer.once( 0, this, this.start );
                        } else {
-                               X.Dom.listenOnce( X.Event.XDOM_READY, this, this.start );
+                               X.ViewPort.listenOnce( X.Event.XDOM_READY, this, this.start );
                        };
                        
                        this.hoverList    = [];
@@ -106,15 +106,14 @@ X.UI._PageRoot = X.UI._Box.inherits(
                        
                        // this.xnodeInteractiveLayer の前に追加する!
 
-                       this.addToParent( X.Dom.Node._body );
+                       this.addToParent( X.Doc.body );
                        
-                       this.xnodeInteractiveLayer = X.Dom.Node._body.create( 'div', {
+                       this.xnodeInteractiveLayer = X.Doc.body.create( 'div', {
                                'class'      : 'mouse-operation-catcher',
                                unselectable : 'on'
                        } );
                        
                        // hover や rollover rollout のための move イベントの追加
-                       // X.Dom.Event.activate, X.Dom.Event.deactivate ?
                        // mouseout, mouseover
                        //if( X_UA_HID.POINTER ){
                                this.xnodeInteractiveLayer.listen( X.UI.Event.IdToName[ X.UI.Event._POINTER_MOVE ], X.UI._eventRellay );
@@ -143,9 +142,9 @@ X.UI._PageRoot = X.UI._Box.inherits(
                doFirstCalc : function(){
                        this.calculate();
                        this.phase = 4;
-                       X.Dom
-                               .listen( X.Dom.Event.VIEW_RESIZED, this, this.calculate )
-                               .listen( X.Dom.Event.BASE_FONT_RESIZED, this, this.calculate );
+                       X.ViewPort
+                               .listen( X.Event.VIEW_RESIZED, this, this.calculate )
+                               .listen( X.Event.BASE_FONT_RESIZED, this, this.calculate );
                },
                
                reserveCalc : function(){
@@ -155,17 +154,10 @@ X.UI._PageRoot = X.UI._Box.inherits(
                        };
                },
                calculate : function( e ){
-                       var font, size, w, h;
-                       if( !e ){
-                               size = X.Dom.getSize();
-                               font = X.Dom.getBaseFontSize();
-                               w    = size[ 0 ];
+                       var size = X.ViewPort.getSize(),
+                               font = X.ViewPort.getBaseFontSize(),
+                               w    = size[ 0 ],
                                h    = size[ 1 ];
-                       } else {
-                               font = e.fontSize;
-                               w = e.w;
-                               h = e.h;
-                       };
                        this.layout.calculate( this, false, 0, 0, w / font, h / font );
                        this.calcReserved = false;
                },