* overflow:hidden かつ width か height が設定されていたら、再描画しないでその値を返す
*/
Node.prototype.width = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.width() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'width' );
- return ( elm = this._rawNode ) ? elm.offsetWidth : 0;
+ return this._rawNode.offsetWidth;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetWidth;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetWidth;
} else {
};
};
Node.prototype.height = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.height() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'height' );
- return ( elm = this._rawNode ) ? elm.offsetHeight : 0;
+ return this._rawNode.offsetHeight;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetHeight;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetHeight;
} else {
};
*/
// X.Dom.Style.transform,
Node.prototype.x = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.x() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'left' );
// this.css( X.Dom.Style.Unit.px, 'translateX' );
- return ( elm = this._rawNode ) ? elm.offsetLeft : 0;
+ return this._rawNode.offsetLeft;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetLeft;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetLeft;
} else {
};
};
Node.prototype.y = function(){
- var elm;
- if( !this.parent ) return 0;
+ if( !this.parent ){
+ console.log( 'xnode.y() : no parent' );
+ return 0;
+ };
+ Node.root._updateTimerID && Node.root._startUpdate();
if( document.getElementById ){
// this.css( X.Dom.Style.Unit.px, 'top' );
// this.css( X.Dom.Style.Unit.px, 'transisitonY' );
- return ( elm = this._rawNode ) ? elm.offsetTop : 0;
+ return this._rawNode.offsetTop;
} else
if( document.all ){
- if( !( elm = this._ie4getRawNode() ) ) return 0;
- Node.root._updateReserved === true && Node.root._startUpdate();
- return elm.offsetTop;
+ return ( this._rawNode || this._ie4getRawNode() ).offsetTop;
} else {
};
-};
\ No newline at end of file
+};
+