\r
size = Node._fontSizeNode._rawNode.offsetHeight;\r
if( X.Dom.baseFontSize !== size ){\r
- X.Dom.baseFontSize && X.Dom.asyncDispatch( 0, { type : X.Dom.Event.BASE_FONT_RESIZED, size : size } );\r
+ X.Dom.baseFontSize && X.Dom.asyncDispatch( 0, { type : X.Dom.Event.BASE_FONT_RESIZED, fontSize : size, w : X.Dom.w, h : X.Dom.h } );\r
X.Dom.baseFontSize = size;\r
};\r
\r
X.Dom._detectFontSize = function(){\r
var size = Node._fontSizeNode._rawNode.offsetHeight;\r
if( X.Dom.baseFontSize !== size ){\r
- X.Dom.baseFontSize && X.Dom.asyncDispatch( 0, { type : X.Dom.Event.BASE_FONT_RESIZED, size : size } );\r
+ X.Dom.baseFontSize && X.Dom.asyncDispatch( 0, { type : X.Dom.Event.BASE_FONT_RESIZED, fontSize : size, w : X.Dom.w, h : X.Dom.h } );\r
X.Dom.baseFontSize = size;\r
};\r
};\r
bottom : 5,\r
bgColor : 0x666666,\r
borderColor : 0x111111,\r
- borderWidth : [ 0, 1, 0, 0 ],\r
+ borderWidth : [ 0, 0, 0, 0 ],\r
borderStyle : 'solid dotted',\r
padding : [ 2, 1.5 ],\r
sizing : 'border'\r
left : '30%',\r
bgColor : 0x999999\r
}),\r
- Text( 'Hello,world!' ),\r
- Text( '----------------------------' ),\r
- Text( 'PettanR team' )\r
+ Text( 'Hello, world!', { width : '100%' } ),\r
+ Text( '----------------------------', { width : '100%' } ),\r
+ txt = Text( 'PettanR-team. rrrrrrrrrr', { width : '100%' } )\r
)\r
-);
\ No newline at end of file
+);\r
+\r
+_text = X.Class._getPrivate( txt );\r
w !== this.contentWidth && xnode.css( 'width', _AbstractUINode.ceil( this.contentWidth ) + 'em' );\r
\r
if( h === X.UI.Attr.AUTO ){\r
- this.contentHeight = h = xnode.scrollHeight() / xnode._getCharSize(); // scrollHeight() ??\r
+ this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize(); // 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
xnode.css( 'width', _AbstractUINode.ceil( w ) + 'em' );\r
\r
this.lastContentWidth = w;\r
- this.contentHeight = h = xnode.scrollHeight() / xnode._getCharSize();\r
+ this.contentHeight = h = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize();\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.scrollHeight() / xnode._getCharSize() : this.lastContentHeight;\r
+ this.lastContentHeight === -1 ? xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize() : 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.scrollHeight() / xnode._getCharSize();\r
+ this.contentHeight = this.lastContentHeight = xnode.css( 'height', 'auto' ).scrollHeight() / xnode._getCharSize();\r
this.scrollWidth = this.contentWidth + this.contentL + this.contentR;\r
this.scrollHeight = this.contentHeight + this.contentT + this.contentB;\r
} else {\r
doFirstCalc : function(){
this.calculate();
this.phase = 4;
- X.Dom.listen( X.Dom.Event.VIEW_RESIZED, this, this.calculate );
+ X.Dom
+ .listen( X.Dom.Event.VIEW_RESIZED, this, this.calculate )
+ .listen( X.Dom.Event.BASE_FONT_RESIZED, this, this.calculate );
},
reserveCalc : function(){