X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F20_ui%2F06_AbstractUINode.js;h=14dea016dc77b0d1db3adb56c5f2586b5497bfda;hb=80baf48679a9d5d59690134c361eb33673029c00;hp=8ff8402547428d7614708d0d9ea7dd4f97c905b5;hpb=5f61a48d303bf9ca6bf021d8957aac743fc8958b;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/20_ui/06_AbstractUINode.js b/0.6.x/js/20_ui/06_AbstractUINode.js index 8ff8402..14dea01 100644 --- a/0.6.x/js/20_ui/06_AbstractUINode.js +++ b/0.6.x/js/20_ui/06_AbstractUINode.js @@ -66,7 +66,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( this.rootData = rootData; this.parent = parent; this.parentData = parentData; - //this.xnode = X.Dom.Node.create( 'div' ); + //this.xnode = X_Doc_create( 'div' ); this.phase = 1; this.dispatch( X.UI.Event.INIT ); @@ -144,7 +144,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( if( v.indexOf( ' ' ) !== -1 ){ v = v.split( ' ' ); } else - if( color && X.Type.isNumber( _v = X.Dom.Style.parseColor( v ) ) ){ + if( color && X.Type.isNumber( _v = X_Node_CSS_objToIEFilterText( v ) ) ){ v = _v; } else { // bad @@ -412,7 +412,7 @@ X.UI._AbstractUINode = X.EventDispatcher.inherits( }, /** - * X.Dom.BoxModel の情報を引きながら top,left,width,height,padding,border の設定 + * X_Node_BoxModel の情報を引きながら top,left,width,height,padding,border の設定 */ updateLayout : function( x, y ){ this.boxX = x; @@ -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 { @@ -874,10 +873,10 @@ X.UI.AbstractUINode = X.Class.create( X.Class.ABSTRACT | X.Class.SUPER_ACCESS, { parent : function(){ - return X.Class._getPrivate( this ).parent; + return X_Class_getPrivate( this ).parent; }, root : function(){ - return X.Class._getPrivate( this ).root; + return X_Class_getPrivate( this ).root; }, /* @@ -885,12 +884,13 @@ X.UI.AbstractUINode = X.Class.create( * サポートされていない場合は無視される.親のレイアウトによって変わる */ attr : function( nameOrObject, valueOrUnit ){ - var p = X.Class._getPrivate( this ), + var p = X_Class_getPrivate( this ), layout, k, def, attrs, v; if( nameOrObject && X.Type.isObject( nameOrObject ) ){ // setter layout = p.parentData && p.parentData.layout.overrideAttrsForChild; // root には parent がない for( k in nameOrObject ){ + if( X_EMPTY_OBJECT[ k ] ) continue; // 親のレイアウトマネージャの許可しない if( layout && !layout[ k ] ){ continue; @@ -921,22 +921,22 @@ X.UI.AbstractUINode = X.Class.create( }, listen : function( type, arg1, arg2, arg3 ){ - X.Class._getPrivate( this ).listen( type, arg1, arg2, arg3 ); + X_Class_getPrivate( this ).listen( type, arg1, arg2, arg3 ); return this; }, listenOnce : function( type, arg1, arg2, arg3 ){ - X.Class._getPrivate( this ).listenOnce( type, arg1, arg2, arg3 ); + X_Class_getPrivate( this ).listenOnce( type, arg1, arg2, arg3 ); return this; }, listening : function( type, arg1, arg2, arg3 ){ - return X.Class._getPrivate( this ).listening( type, arg1, arg2, arg3 ); + return X_Class_getPrivate( this ).listening( type, arg1, arg2, arg3 ); }, unlisten : function( type, arg1, arg2, arg3 ){ - X.Class._getPrivate( this ).unlisten( type, arg1, arg2, arg3 ); + X_Class_getPrivate( this ).unlisten( type, arg1, arg2, arg3 ); return this; }, dispatch : function( e ){ - return X.Class._getPrivate( this ).dispatch( e ); + return X_Class_getPrivate( this ).dispatch( e ); }, getNextNode : function(){ @@ -946,7 +946,7 @@ X.UI.AbstractUINode = X.Class.create( }, nodeIndex : function( v ){ - var data = X.Class._getPrivate( this ); + var data = X_Class_getPrivate( this ); if( typeof v === 'number' ){ // data.nodeIndex( v ); return this; @@ -958,44 +958,44 @@ X.UI.AbstractUINode = X.Class.create( }, getX : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxX; + return X_Class_getPrivate( this ).boxX; }, getY : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxY; + return X_Class_getPrivate( this ).boxY; }, getAbsoluteX : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).absoluteX; + return X_Class_getPrivate( this ).absoluteX; }, getAbsoluteY: function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).absoluteY; + return X_Class_getPrivate( this ).absoluteY; }, getWidth : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxWidth; + return X_Class_getPrivate( this ).boxWidth; }, getHeight : function(){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).boxHeight; + return X_Class_getPrivate( this ).boxHeight; }, scrollTo : function( x, y ){ - X.Class._getPrivate( this ).scrollTo( x, y ); + X_Class_getPrivate( this ).scrollTo( x, y ); }, getScrollX : function( v ){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).scrollX( v ); + return X_Class_getPrivate( this ).scrollX( v ); }, getScrollY : function( v ){ // dirty の場合、rootData.calculate - return X.Class._getPrivate( this ).scrollY( v ); + return X_Class_getPrivate( this ).scrollY( v ); }, disabled : function( v ){ - return X.Class._getPrivate( this ).disabled( v ); + return X_Class_getPrivate( this ).disabled( v ); }, cursor : function( v ){ - return X.Class._getPrivate( this ).cursor( v ); + return X_Class_getPrivate( this ).cursor( v ); } } );