overflow : hidden;\r
}\r
\r
+.PageRoot {\r
+ height : 100%;\r
+ position : relative;\r
+}\r
+\r
+.PageRoot,\r
.PageRoot div {\r
/* 要素は絶対配置される */\r
position : absolute;\r
top : 0;\r
left : 0;\r
+ width : 100%;\r
padding : 0;\r
margin : 0;\r
/* ブラウザのレイアウト機能による auto なサイズ指定は行わない */\r
/* browser bug fix */\r
-moz-opacity : 0.99;\r
zoom : 1;\r
+ \r
+ *word-break : break-all; /* ie5+ */\r
+ word-wrap : break-word; /* IE5.5?5?, Firefox3.5, Chrome1 Opera10.5 Safari1 */\r
+ white-space : pre; /* CSS 2.0 */\r
+ white-space : pre-wrap; /* CSS 2.1 */\r
+ white-space : pre-line; /* CSS 3.0 */\r
+ /* white-space : -pre-wrap; Opera 4-6 */\r
+ /* white-space : -o-pre-wrap; Opera 7 */\r
+ white-space : -moz-pre-wrap; /* Mozilla */\r
+ /* white-space : -hp-pre-wrap; HP Printers */\r
+ white-space : normal\9; /* ie系では、 float要素へ回り込みする、 white-space の効いているテキストの位置が狂う */\r
}\r
\r
* {zoom:1}\r
z-index : 99;\r
}\r
\r
-/*------------------------------------------------------------------------------------\r
- * mouse-operation-catcher\r
- */\r
-.jul-hover {\r
- opacity : 0.5;\r
-}\r
-\r
-.PageRoot {\r
- position : relative;\r
-}\r
-\r
-.Box,\r
-.VBox,\r
-.HBox,\r
-.TileBox,\r
-.ChromeBox,\r
-.ScrollBox {\r
- position : absolute;\r
- overflow : hidden;\r
- box-sizing : border-box;\r
- -moz-box-sizing : border-box;\r
-}\r
-\r
/* Scrollbox\r
--------------------------------------------------------------------------------------*/\r
.ScrollBox-Scroller {\r
<!DOCTYPE html>\r
<html lang="ja" class="js-disabled">\r
<head>\r
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+<meta charset="utf-8">\r
<title>New X.UI</title>\r
<meta name="HandheldFriendly" content="true">\r
<meta name="mobileoptimized" content="0">\r
<meta name="format-detection" content="telephone=no">\r
<meta name="apple-mobile-web-app-capable">\r
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,maximum-scale=1">\r
-<link rel="stylesheet" type="text/css" media="all" href="css/ju.css">\r
+<link rel="stylesheet" type="text/css" media="all" href="css/xui.css">\r
\r
<script type="text/javascript" src="js/core/00_builtin.js"></script>\r
<script type="text/javascript" src="js/core/00_X.js"></script>\r
return this._rawNode.scrollHeight;\r
} else\r
if( X.Dom.DOM_IE4 ){\r
- return ( this._rawNode || this._ie4getRawNode() ).scollHeight;\r
+ return ( this._rawNode || this._ie4getRawNode() ).scrollHeight;\r
} else {\r
\r
};\r
\r
borderColor : [ 0x0, X.UI.Dirty.PAINT, X.UI.Attr.USER.XNODE, X.UI.Attr.Type.QUARTET | X.UI.Attr.Type.COLOR ], // color [ top, right, bottom, left ]\r
borderStyle : [ 0, X.UI.Dirty.PAINT, X.UI.Attr.USER.XNODE, X.UI.Attr.Type.QUARTET | X.UI.Attr.Type.LIST, X.UI.Attr.Option.BORDER_STYLE ], // string [ top, right, bottom, left ]\r
- bgColor : [ 0xFFFFFF, X.UI.Dirty.PAINT, X.UI.Attr.USER.XNODE, X.UI.Attr.Type.COLOR ], // color\r
+ bgColor : [ 0xFFFFFF, X.UI.Dirty.PAINT, X.UI.Attr.USER.XNODE, X.UI.Attr.Type.COLOR ], // color, none\r
\r
fontColor : [ 0x0, X.UI.Dirty.PAINT, X.UI.Attr.USER.XNODE, X.UI.Attr.Type.COLOR ],\r
fontFamily : [ null, X.UI.Dirty.FONT, X.UI.Attr.USER.XNODE, X.UI.Attr.Type.FONT_NAME ],\r
this.xnode\r
.css( 'left', x ? x + 'em' : 0 )\r
.css( 'top', y ? y + 'em' : 0 )\r
- .css( 'width', this.contentWidth ? this.contentWidth + 'em' : 0 )\r
- .css( 'height', this.contentHeight ? this.contentHeight + 'em' : 0 )\r
+ .css( 'width', this.contentWidth ? _AbstractUINode.ceil( this.contentWidth ) + 'em' : 0 )\r
+ .css( 'height', this.contentHeight ? _AbstractUINode.ceil( this.contentHeight ) + 'em' : 0 )\r
.css( 'padding', this._createCssText( 'padding' ) )\r
.css( 'borderWidth', this._createCssText( 'borderWidth' ) );\r
},\r
*/\r
if( xnode._xnodes && xnode._xnodes.length ){\r
if( w === X.UI.Attr.AUTO ){\r
- w = this.contentWidth = xnode.width() / xnode._getCharSize();\r
+ w = this.contentWidth = xnode.css( 'width', 'auto' ).width() / xnode._getCharSize();\r
+ console.log( xnode.width() + ' ' + xnode._getCharSize() + ' > ' + w );\r
\r
this.scrollWidth = w + this.contentL + this.contentR;\r
if( this.maxContentWidth < w - this.boxSizingOffsetLR ) this.contentWidth = this.maxContentWidth + this.boxSizingOffsetLR;\r
if( w - this.boxSizingOffsetLR < this.minContentWidth ) this.contentWidth = this.minContentWidth + this.boxSizingOffsetLR;\r
this.lastContentWidth = this.contentWidth;\r
\r
- w !== this.contentWidth && xnode.css( 'width', this.contentWidth + 'em' );\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.height() / xnode._getCharSize();\r
+ this.contentHeight = h = xnode.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
} else\r
if( h === X.UI.Attr.AUTO ){\r
if( w !== this.lastContentWidth ){\r
- xnode.css( 'width', w + 'em' );\r
+ xnode.css( 'width', _AbstractUINode.ceil( w ) + 'em' );\r
\r
this.lastContentWidth = w;\r
- this.contentHeight = h = xnode.height() / xnode._getCharSize();\r
+ this.contentHeight = h = xnode.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
max = calc( styleMax, srcValue );\r
return v <= min ? min : max <= v ? max : v;\r
};\r
+_AbstractUINode.ceil = function( v ){\r
+ if( 0 <= v ){\r
+ return ( v * 10 + 0.999 | 0 ) / 10;\r
+ };\r
+ return ( -v * 10 + 0.999 | 0 ) / -10;\r
+};\r
\r
var AbstractUINode = X.Class.create(\r
'AbstractUINode',\r