OSDN Git Service

Version 0.6.9, X.Class using X.Callback object, X.Net.Image working.
[pettanr/clientJs.git] / 0.6.x / js / 02_dom / 04_XDomBoxModel.js
index 3d6f78f..31d2058 100644 (file)
@@ -15,7 +15,7 @@ X.Dom.BoxModel = {
 \r
 \r
 \r
-X.Dom.listenOnce( X.Dom.Event.DOM_INIT, function(){\r
+X.Dom.listenOnce( X_TEMP.SYSTEM_EVENT_INIT, function(){\r
 \r
        var node = Node._systemNode,\r
        \r
@@ -87,12 +87,12 @@ Node.prototype.width = function(){
                console.log( 'xnode.width() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawObject.offsetWidth;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).offsetWidth;\r
        } else {\r
                \r
@@ -109,12 +109,12 @@ Node.prototype.height = function(){
                console.log( 'xnode.height() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'height' );\r
                return this._rawObject.offsetHeight;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).offsetHeight;\r
        } else {\r
                \r
@@ -131,12 +131,12 @@ Node.prototype.clientWidth = function(){
                console.log( 'xnode.width() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawObject.clientWidth;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).clientWidth;\r
        } else {\r
                \r
@@ -153,12 +153,12 @@ Node.prototype.clientHeight = function(){
                console.log( 'xnode.height() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'height' );\r
                return this._rawObject.clientHeight;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).clientHeight;\r
        } else {\r
                \r
@@ -175,12 +175,12 @@ Node.prototype.scrollWidth = function(){
                console.log( 'xnode.width() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawObject.scrollWidth;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).scrollWidth;\r
        } else {\r
                \r
@@ -197,12 +197,12 @@ Node.prototype.scrollHeight = function(){
                console.log( 'xnode.height() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'height' );\r
                return this._rawObject.scrollHeight;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).scrollHeight;\r
        } else {\r
                \r
@@ -219,12 +219,12 @@ Node.prototype.scrollLeft = function(){
                console.log( 'xnode.scrollLeft() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawObject.scrollLeft;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).scrollLeft;\r
        } else {\r
                \r
@@ -241,12 +241,12 @@ Node.prototype.scrollTop = function(){
                console.log( 'xnode.scrollTop() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawObject.scrollTop;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).scrollTop;\r
        } else {\r
                \r
@@ -271,13 +271,13 @@ Node.prototype.x = function(){
                console.log( 'xnode.x() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'left' );\r
                // this.css( X.Dom.Style.Unit.px, 'translateX' );\r
                return this._rawObject.offsetLeft;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).offsetLeft;\r
        } else {\r
                \r
@@ -294,13 +294,13 @@ Node.prototype.y = function(){
                console.log( 'xnode.y() : not belong tree.' );\r
                return 0;\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( X.Dom.DOM_W3C ){\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
+       if( X_UA_DOM.W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'top' );\r
                // this.css( X.Dom.Style.Unit.px, 'transisitonY' );\r
                return this._rawObject.offsetTop;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                return ( this._rawObject || this._ie4getRawNode() ).offsetTop;          \r
        } else {\r
                \r
@@ -319,16 +319,16 @@ Node.prototype.offset = function( /* xnodeParent */ ){
                console.log( 'xnode.offset() : not belong tree.' );\r
                return { x : 0, y : 0 };\r
        };\r
-       if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
+       if( this._state & X_Node_State.DISPLAY_NONE ) return 0;\r
        \r
        if( X.Dom.Node._body === this || X.Dom.Node._html === this ){\r
                return { x : 0, y : 0 };\r
        };\r
        \r
-       if( X.Dom.DOM_W3C ){\r
+       if( X_UA_DOM.W3C ){\r
                elm = this._rawObject;\r
        } else\r
-       if( X.Dom.DOM_IE4 ){\r
+       if( X_UA_DOM.IE4 ){\r
                elm = this._rawObject || this._ie4getRawNode();         \r
        } else {\r
                \r