X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2Fmain.js;h=73ef331a4a209668d4608120d205370a34732ef2;hb=136b808d09fef278c92b1c1c2cecf67f1383314d;hp=ae31769117ccf28b238fe63aca33cc14dfacc854;hpb=46d3fdf2559c59963e53ff6136c3fd58cd8f7a6d;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/main.js b/0.6.x/js/main.js index ae31769..73ef331 100644 --- a/0.6.x/js/main.js +++ b/0.6.x/js/main.js @@ -1,22 +1,34 @@ -root = PageRoot( - Box({ - width : '10%', - height : '10%', - left : 5, - top : 1, +root = X.UI.PageRoot( + X.UI.HBox( + { + width : '50%', + bgColor : 0x44ffff + }, + X.UI.Text( 'HTML4', { width : 3 } ), + X.UI.Text( 'Ruby on Rails' ), + X.UI.Text( 'js' ), + X.UI.Text( 'SVG' ), + X.UI.Text( 'heroku' ), + X.UI.Text( 'flash' ) + ), + X.UI.Box({ + width : '25%', + height : '25%', + left : '25%', + top : '50%', bgColor : 0x0000ff }), - Box({ - width : 5, - height : 5, - left : '10%', - bottom : '70%', - bgColor : 0xff0000 + X.UI.Box({ + width : '25%', + height : '25%', + left : 0, + bottom : 0, + bgColor : 0xff0000 }), - VBox( + X.UI.VBox( { - width : '50%', - left : '49%', + width : '40%', + left : '55%', top : 5, bottom : 5, bgColor : 0x666666, @@ -24,18 +36,32 @@ root = PageRoot( borderWidth : [ 0, 0, 0, 0 ], borderStyle : 'solid dotted', padding : [ 4, 1 ], - sizing : 'border' + sizing : 'border', + gapY : 1 }, - Box({ + X.UI.Box({ width : '50%', height : 2, left : '25%', bgColor : 0x999999 }), - Text( 'Hello, world!', { width : '100%' } ), - Text( '----------------------------', { width : '100%' } ), - text = Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } ) - .listen( X.UI.Event.TAP, _onClick ) + X.UI.Text( 'Hello, world!' ), + X.UI.Text( '----------------------------' ), + text = X.UI.Text( 'PettanR-team. rrrrrrrrrr' ) + .listen( X.UI.Event.TAP, _onClick ), + X.UI.HBox( + { + width : '100%', + gapX : 2, + bgColor : 0xff77ff + }, + X.UI.Text( 'HTML4', { width : 2 } ), + X.UI.Text( 'Ruby on Rails', { width : 2 } ), + X.UI.Text( 'js' ), + X.UI.Text( 'SVG' ), + X.UI.Text( 'heroku' ), + X.UI.Text( 'flash' ) + ) ) ); _root = X.Class._getPrivate( root ); @@ -43,4 +69,5 @@ _text = X.Class._getPrivate( text ); function _onClick( e ){ alert( e.type ); + console.log( e.type + ' -----------' ); };