OSDN Git Service

forgot to commit...
authoritozyun <itozyun@user.sourceforge.jp>
Thu, 16 Oct 2014 08:01:58 +0000 (17:01 +0900)
committeritozyun <itozyun@user.sourceforge.jp>
Thu, 16 Oct 2014 08:01:58 +0000 (17:01 +0900)
0.6.x/js/20_ui/06_AbstractUINode.js
0.6.x/js/20_ui/20_PageRoot.js

index cf3765f..f3b9c1f 100644 (file)
@@ -601,8 +601,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                         */\r
                                        if( xnode._xnodes && xnode._xnodes.length ){\r
                                                if( w === X.UI.Attr.AUTO ){\r
-                                                       w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / xnode._getCharSize();\r
-                                                       //console.log( xnode.width() + ' ' + xnode._getCharSize() + ' > ' + w );\r
+                                                       w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / X_Node_CSS_getCharSize( xnode );\r
                                                        \r
                                                        this.scrollWidth = w + this.contentL + this.contentR;\r
                                                        if( this.maxContentWidth < w - this.boxSizingOffsetLR ) this.contentWidth = this.maxContentWidth + this.boxSizingOffsetLR;\r
@@ -612,7 +611,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                                        w !== this.contentWidth && xnode.css( 'width', X.UI._AbstractUINode.ceil( this.contentWidth ) + 'em' );\r
                                                        \r
                                                        if( h === X.UI.Attr.AUTO ){\r
-                                                               this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); // scrollHeight() ??\r
+                                                               this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ); // scrollHeight() ??\r
                                                                this.scrollHeight  = h + this.contentT + this.contentB;\r
                                                                if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
                                                                if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;\r
@@ -627,21 +626,21 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits(
                                                                xnode.css( 'width', X.UI._AbstractUINode.ceil( w ) + 'em' );\r
                                                                \r
                                                                this.lastContentWidth  = w;\r
-                                                               this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize();\r
+                                                               this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode );\r
                                                                this.scrollWidth       = w + this.contentL + this.contentR;\r
                                                                this.scrollHeight      = h + this.contentT + this.contentB;\r
                                                                if( this.maxContentHeight < h - this.boxSizingOffsetTB ) this.contentHeight = this.maxContentHeight + this.boxSizingOffsetTB;\r
                                                                if( h - this.boxSizingOffsetTB < this.minContentHeight ) this.contentHeight = this.minContentHeight + this.boxSizingOffsetTB;                                                           \r
                                                        } else {\r
                                                                this.contentHeight = this.lastContentHeight = h =\r
-                                                                       this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize() : this.lastContentHeight;\r
+                                                                       this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode ) : this.lastContentHeight;\r
                                                                this.scrollWidth   = w + this.contentL + this.contentR;\r
                                                                this.scrollHeight  = h + this.contentT + this.contentB;\r
                                                        };\r
                                                } else\r
                                                if( dirty !== X.UI.Dirty.LAYOUT ){\r
                                                        this.contentWidth  = this.lastContentWidth  = w; //xnode.width();\r
-                                                       this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize();\r
+                                                       this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / X_Node_CSS_getCharSize( xnode );\r
                                                        this.scrollWidth   = this.contentWidth  + this.contentL + this.contentR;\r
                                                        this.scrollHeight  = this.contentHeight + this.contentT + this.contentB;\r
                                                } else {\r
index c346c0c..eae3e90 100644 (file)
@@ -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;
                },