X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2Fmain.js;fp=0.6.x%2Fjs%2Fmain.js;h=ae31769117ccf28b238fe63aca33cc14dfacc854;hb=46d3fdf2559c59963e53ff6136c3fd58cd8f7a6d;hp=aa91895db0dc0937cf17c06c59678b42a69e2632;hpb=674534de31c071bb05799c874ece43a07a7883eb;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/main.js b/0.6.x/js/main.js index aa91895..ae31769 100644 --- a/0.6.x/js/main.js +++ b/0.6.x/js/main.js @@ -1,4 +1,4 @@ -PageRoot( +root = PageRoot( Box({ width : '10%', height : '10%', @@ -23,19 +23,24 @@ PageRoot( borderColor : 0x111111, borderWidth : [ 0, 0, 0, 0 ], borderStyle : 'solid dotted', - padding : [ 2, 1.5 ], + padding : [ 4, 1 ], sizing : 'border' }, Box({ width : '50%', height : 2, - left : '30%', + left : '25%', bgColor : 0x999999 }), Text( 'Hello, world!', { width : '100%' } ), Text( '----------------------------', { width : '100%' } ), - txt = Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } ) + text = Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } ) + .listen( X.UI.Event.TAP, _onClick ) ) ); +_root = X.Class._getPrivate( root ); +_text = X.Class._getPrivate( text ); -_text = X.Class._getPrivate( txt ); +function _onClick( e ){ + alert( e.type ); +};