X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F01_dom%2F13_XDomBoxModel.js;fp=0.6.x%2Fjs%2F01_dom%2F13_XDomBoxModel.js;h=c3c0bf556e73af573ae885c55004900988f411a4;hb=0eaaa84ad608663f26fff366dacc9ab785d2dfe2;hp=855a9b5078073a4ef62e5da7aa8ed2c357f72628;hpb=d3bd48b05c1f862dafaa3fb42a4ca155548b548e;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/01_dom/13_XDomBoxModel.js b/0.6.x/js/01_dom/13_XDomBoxModel.js index 855a9b5..c3c0bf5 100644 --- a/0.6.x/js/01_dom/13_XDomBoxModel.js +++ b/0.6.x/js/01_dom/13_XDomBoxModel.js @@ -121,6 +121,50 @@ Node.prototype.height = function(){ }; }; +Node.prototype.clientWidth = function(){ + if( !this.parent ){// todo : _state で tree に所属しているか?判定 + console.log( 'xnode.width() : no parent' ); + return 0; + }; + Node._body._updateTimerID && Node._body._startUpdate(); + if( !this._root ){ + console.log( 'xnode.width() : not belong tree.' ); + return 0; + }; + if( this._state & X.Dom.State.DISPLAY_NONE ) return 0; + if( X.Dom.DOM_W3C ){ + // this.css( X.Dom.Style.Unit.px, 'width' ); + return this._rawNode.clientWidth; + } else + if( X.Dom.DOM_IE4 ){ + return ( this._rawNode || this._ie4getRawNode() ).clientWidth; + } else { + + }; +}; + +Node.prototype.clientHeight = function(){ + if( !this.parent ){ + console.log( 'xnode.height() : no parent' ); + return 0; + }; + Node._body._updateTimerID && Node._body._startUpdate(); + if( !this._root ){ + console.log( 'xnode.height() : not belong tree.' ); + return 0; + }; + if( this._state & X.Dom.State.DISPLAY_NONE ) return 0; + if( X.Dom.DOM_W3C ){ + // this.css( X.Dom.Style.Unit.px, 'height' ); + return this._rawNode.clientHeight; + } else + if( X.Dom.DOM_IE4 ){ + return ( this._rawNode || this._ie4getRawNode() ).clientHeight; + } else { + + }; +}; + Node.prototype.scrollWidth = function(){ if( !this.parent ){// todo : _state で tree に所属しているか?判定 console.log( 'xnode.width() : no parent' );