From: itozyun Date: Thu, 16 Oct 2014 08:01:58 +0000 (+0900) Subject: forgot to commit... X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=a4b6249d16b938ce6fd1c7691f144ff99729056f;p=pettanr%2FclientJs.git forgot to commit... --- diff --git a/0.6.x/js/20_ui/06_AbstractUINode.js b/0.6.x/js/20_ui/06_AbstractUINode.js index cf3765f..f3b9c1f 100644 --- a/0.6.x/js/20_ui/06_AbstractUINode.js +++ b/0.6.x/js/20_ui/06_AbstractUINode.js @@ -601,8 +601,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( */ if( xnode._xnodes && xnode._xnodes.length ){ if( w === X.UI.Attr.AUTO ){ - w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / xnode._getCharSize(); - //console.log( xnode.width() + ' ' + xnode._getCharSize() + ' > ' + w ); + w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / X_Node_CSS_getCharSize( xnode ); this.scrollWidth = w + this.contentL + this.contentR; if( this.maxContentWidth < w - this.boxSizingOffsetLR ) this.contentWidth = this.maxContentWidth + this.boxSizingOffsetLR; @@ -612,7 +611,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( w !== this.contentWidth && xnode.css( 'width', X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' ); if( h === X.UI.Attr.AUTO ){ - this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); // scrollHeight() ?? + this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); // scrollHeight() ?? this.scrollHeight = h + this.contentT + this.contentB; if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB; if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB; @@ -627,21 +626,21 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( xnode.css( 'width', X.UI._AbstractUINode.ceil( w ) + 'em' ); this.lastContentWidth = w; - this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); + this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); this.scrollWidth = w + this.contentL + this.contentR; this.scrollHeight = h + this.contentT + this.contentB; if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB; if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB; } else { this.contentHeight = this.lastContentHeight = h = - this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize() : this.lastContentHeight; + this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ) : this.lastContentHeight; this.scrollWidth = w + this.contentL + this.contentR; this.scrollHeight = h + this.contentT + this.contentB; }; } else if( dirty !== X.UI.Dirty.LAYOUT ){ this.contentWidth = this.lastContentWidth = w; //xnode.width(); - this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); + this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); this.scrollWidth = this.contentWidth + this.contentL + this.contentR; this.scrollHeight = this.contentHeight + this.contentT + this.contentB; } else { diff --git a/0.6.x/js/20_ui/20_PageRoot.js b/0.6.x/js/20_ui/20_PageRoot.js index c346c0c..eae3e90 100644 --- a/0.6.x/js/20_ui/20_PageRoot.js +++ b/0.6.x/js/20_ui/20_PageRoot.js @@ -154,17 +154,10 @@ X.UI._PageRoot = X.UI._Box.inherits( }; }, calculate : function( e ){ - var font, size, w, h; - if( !e ){ - size = X.ViewPort.getSize(); - font = X.ViewPort.getBaseFontSize(); - w = size[ 0 ]; + var size = X.ViewPort.getSize(), + font = X.ViewPort.getBaseFontSize(), + w = size[ 0 ], h = size[ 1 ]; - } else { - font = e.fontSize; - w = e.w; - h = e.h; - }; this.layout.calculate( this, false, 0, 0, w / font, h / font ); this.calcReserved = false; },