X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F12_HBox.js;h=6639a7c40908e00ae6eb0373d1b2addbb509388b;hb=3d352d8bf476ab57cc333e8d02d0e6ea5efa69b7;hp=1efff7ad62395b11f05a019284b19f7b5c176f22;hpb=2956150a7c2798e60639b36d69b0c13f6b20a62a;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/20_ui/12_HBox.js b/0.6.x/js/20_ui/12_HBox.js index 1efff7a..6639a7c 100644 --- a/0.6.x/js/20_ui/12_HBox.js +++ b/0.6.x/js/20_ui/12_HBox.js @@ -34,11 +34,11 @@ var XUI_Layout_Horizontal = X[ 'UI' ][ 'Layout' ][ 'Horizontal' ] = XUI_createLa autoW = contentW === XUI_Attr_AUTO; autoH = contentH === XUI_Attr_AUTO; detectionPhase = autoW || autoH; - gapX = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.gapX.No ], contentW ); - childW = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.childWidth.No ], contentW ); - childH = XUI_AbstractUINode_calcValue( attrs[ data.supportAttrs.childHeight.No ], contentH ); - _x = data.contentL; - _y = data.contentT; + gapX = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.gapX.No ], contentW ); + childW = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.childWidth.No ], contentW ); + childH = XUI_AbstractUINode_calcValue( attrs[ data.usableAttrs.childHeight.No ], contentH ); + _x = 0; //data.contentL; + _y = 0; //data.contentT; if( !detectionPhase ) ret = false; @@ -46,14 +46,14 @@ var XUI_Layout_Horizontal = X[ 'UI' ][ 'Layout' ][ 'Horizontal' ] = XUI_createLa _h = 0; for( i = 0; i < l; ++i ){ node = uinodes[ i ]; - node.calculate( detectionPhase, _x, _y, childW, childH ); + node.calculate( detectionPhase, _x, 0, childW, childH ); _x += node.boxWidth + gapX; if( autoH ){ if( node.boxHeight !== XUI_Attr_AUTO ){ h = node.boxHeight; } else - if( node.minBoxHeight !== XUI_Attr_AUTO ){ - h = node.minBoxHeight; + if( node.boxHeightMin !== XUI_Attr_AUTO ){ + h = node.boxHeightMin; minFlag = true; } else { h = 0; @@ -63,16 +63,16 @@ var XUI_Layout_Horizontal = X[ 'UI' ][ 'Layout' ][ 'Horizontal' ] = XUI_createLa }; _x -= gapX; } else { - _h = data.minContentHeight !== XUI_Attr_AUTO ? data.minContentHeight : 0; + _h = data.contentHeightMin !== XUI_Attr_AUTO ? data.contentHeightMin : 0; }; if( detectionPhase ){ if( autoW ) data.contentWidth = _x; if( autoH ) data.contentHeight = _h; - _x = data.contentL; + _x = 0; //data.contentL; for( i = 0; i < l; ++i ){ node = uinodes[ i ]; - node.calculate( false, _x, _y, data.contentWidth, data.contentHeight ); + node.calculate( false, _x, 0, data.contentWidth, data.contentHeight ); _x += node.boxWidth + gapX; }; data.postMesure(); @@ -105,13 +105,13 @@ X.UI.HBox = X.UI.Box.inherits( var supports; if( !XUI_HBox ){ - supports = XUI_Attr_createAttrDef( XUI_Box.prototype.supportAttrs, XUI_Layout_Horizontal.overrideAttrsForSelf ); + supports = XUI_Attr_createAttrDef( XUI_Box.prototype.usableAttrs, XUI_Layout_Horizontal.overrideAttrsForSelf ); XUI_HBox = XUI_Box.inherits( { - layout : XUI_Layout_Horizontal, - supportAttrs : supports, - attrClass : XUI_Attr_preset( XUI_Box.prototype.attrClass, supports, { + layout : XUI_Layout_Horizontal, + usableAttrs : supports, + attrClass : XUI_Attr_preset( XUI_Box.prototype.attrClass, supports, { gapX : '0.2em' } ) }