X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=sidebyside;f=0.6.x%2Fjs%2F20_ui%2F20_PageRoot.js;h=fd84be3460640a173ca7fa55500e07de7980744e;hb=78f2b6b1bb07448d1c314775bf28a41b7111e386;hp=d8dbac28435a2f55e4fcba3b997e3748a6804ace;hpb=5f61a48d303bf9ca6bf021d8957aac743fc8958b;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/20_ui/20_PageRoot.js b/0.6.x/js/20_ui/20_PageRoot.js index d8dbac2..fd84be3 100644 --- a/0.6.x/js/20_ui/20_PageRoot.js +++ b/0.6.x/js/20_ui/20_PageRoot.js @@ -1,7 +1,8 @@ X.UI._eventRellay = function( e ){ - var x = e.clientX / X.Dom.baseFontSize, - y = e.clientY / X.Dom.baseFontSize, + var font = X.ViewPort.getBaseFontSize(), + x = e.clientX / font, + y = e.clientY / font, type = X.UI.Event.NameToID[ e.type ], i = 0, data = X.UI.currentRootData, @@ -82,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.Dom.Event.XDOM_READY ){ + if( X_ViewPort_readyState === X.Event.XDOM_READY ){ X.Timer.once( 0, this, this.start ); } else { - X.Dom.listenOnce( X.Dom.Event.XDOM_READY, this, this.start ); + X.ViewPort.listenOnce( X.Event.XDOM_READY, this, this.start ); }; this.hoverList = []; @@ -105,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 ); @@ -142,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(){ @@ -154,16 +154,10 @@ X.UI._PageRoot = X.UI._Box.inherits( }; }, calculate : function( e ){ - var font = X.Dom.baseFontSize, - size, w, h; - if( !e ){ - size = X.Dom.getSize(); - w = size[ 0 ]; + var size = X.ViewPort.getSize(), + font = X.ViewPort.getBaseFontSize(), + w = size[ 0 ], h = size[ 1 ]; - } else { - w = e.w; - h = e.h; - }; this.layout.calculate( this, false, 0, 0, w / font, h / font ); this.calcReserved = false; },