X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F20_PageRoot.js;h=e4d2ab4dd7dd960b455e9230b0ba7b6e4eca435c;hb=20c3a948b20e52efc28fd103fc075d787c6d65d2;hp=a73c3e6467fb97dfa5a9dfa8cbacbe6be79fc270;hpb=136b808d09fef278c92b1c1c2cecf67f1383314d;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 a73c3e6..e4d2ab4 100644 --- a/0.6.x/js/20_ui/20_PageRoot.js +++ b/0.6.x/js/20_ui/20_PageRoot.js @@ -3,8 +3,8 @@ var X_UI_rootData = null, function X_UI_eventRellay( e ){ var font = X_ViewPort_baseFontSize, - x = e.clientX / font, - y = e.clientY / font, + x = e.pageX / font, // clientX は iOS4- で通らない? + y = e.pageY / font, type = XUI_Event.NameToID[ e.type ], i = 0, data = X_UI_rootData, @@ -69,7 +69,7 @@ function X_UI_eventRellay( e ){ var XUI_PageRoot = XUI_Box.inherits( '_PageRoot', - X_Class.FINAL | X_Class.PRIVATE_DATA, + X_Class.FINAL, { layout : XUI_Layout_Canvas, @@ -82,8 +82,8 @@ var XUI_PageRoot = XUI_Box.inherits( eventCounter : null, cursorStyle : null, - Constructor : function( layout, args ){ - this[ 'Super' ]( layout, args ); + Constructor : function( user, layout, args ){ + this[ 'Super' ]( user, layout, args ); if( X_ViewPort_readyState === X_EVENT_XDOM_READY ){ X_Timer_once( 0, this, this.start ); @@ -179,6 +179,29 @@ function XUI_PageRoot_onViewUpdate( e ){ this[ 'dispatch' ]( XUI_Event.LAYOUT_COMPLETE ); }; +//var XUI_PageRoot; +// TODO singleton +X.UI.PageRoot = X.UI.Box.inherits( + 'PageRoot', + X_Class.NONE, + { + Constructor : function(){ + var supports; + + //if( !XUI_PageRoot ){ + supports = XUI_Attr_createAttrDef( XUI_Box.prototype.usableAttrs, XUI_Layout_Canvas.overrideAttrsForSelf ); + + XUI_PageRoot.prototype.layout = XUI_Layout_Canvas; + XUI_PageRoot.prototype.usableAttrs = supports; + XUI_PageRoot.prototype.attrClass = XUI_Attr_preset( XUI_Box.prototype.attrClass, supports, { + width : '100%', + height : '100%' + } ); + //}; + X_Pair_create( this, XUI_PageRoot( this, XUI_Layout_Canvas, arguments ) ); + } + }); +/* X.UI.PageRoot = X.UI.Box.presets( 'PageRoot', XUI_PageRoot, @@ -186,5 +209,5 @@ X.UI.PageRoot = X.UI.Box.presets( width : '100%', height : '100%' } -); +);*/