OSDN Git Service

Version 0.6.37, bugfix.
[pettanr/clientJs.git] / 0.6.x / js / dom / 13_XDomBoxModel.js
index a67c532..ea827c4 100644 (file)
@@ -2,7 +2,6 @@ X.Dom.BoxModel = {
        CONTENT_BOX      : 1,\r
        PADDING_BOX      : 2,\r
        BORDER_BOX       : 3,\r
-       MARGIN_BOX       : 4,\r
                \r
        defaultBoxModel  : 0,\r
        boxSizingEnabled : false,\r
@@ -63,11 +62,11 @@ Node.prototype.width = function(){
                return 0;\r
        };\r
        if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( document.getElementById ){\r
+       if( X.Dom.DOM_W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawNode.offsetWidth;\r
        } else\r
-       if( document.all ){\r
+       if( X.Dom.DOM_IE4 ){\r
                return ( this._rawNode || this._ie4getRawNode() ).offsetWidth;\r
        } else {\r
                \r
@@ -85,11 +84,11 @@ Node.prototype.height = function(){
                return 0;\r
        };\r
        if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( document.getElementById ){\r
+       if( X.Dom.DOM_W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'height' );\r
                return this._rawNode.offsetHeight;\r
        } else\r
-       if( document.all ){\r
+       if( X.Dom.DOM_IE4 ){\r
                return ( this._rawNode || this._ie4getRawNode() ).offsetHeight;\r
        } else {\r
                \r
@@ -107,11 +106,11 @@ Node.prototype.scrollWidth = function(){
                return 0;\r
        };\r
        if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( document.getElementById ){\r
+       if( X.Dom.DOM_W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'width' );\r
                return this._rawNode.scrollWidth;\r
        } else\r
-       if( document.all ){\r
+       if( X.Dom.DOM_IE4 ){\r
                return ( this._rawNode || this._ie4getRawNode() ).scrollWidth;\r
        } else {\r
                \r
@@ -129,11 +128,11 @@ Node.prototype.scrollHeight = function(){
                return 0;\r
        };\r
        if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( document.getElementById ){\r
+       if( X.Dom.DOM_W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'height' );\r
                return this._rawNode.scrollHeight;\r
        } else\r
-       if( document.all ){\r
+       if( X.Dom.DOM_IE4 ){\r
                return ( this._rawNode || this._ie4getRawNode() ).scollHeight;\r
        } else {\r
                \r
@@ -160,12 +159,12 @@ Node.prototype.x = function(){
                return 0;\r
        };\r
        if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( document.getElementById ){\r
+       if( X.Dom.DOM_W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'left' );\r
                // this.css( X.Dom.Style.Unit.px, 'translateX' );\r
                return this._rawNode.offsetLeft;\r
        } else\r
-       if( document.all ){\r
+       if( X.Dom.DOM_IE4 ){\r
                return ( this._rawNode || this._ie4getRawNode() ).offsetLeft;\r
        } else {\r
                \r
@@ -183,12 +182,12 @@ Node.prototype.y = function(){
                return 0;\r
        };\r
        if( this._state & X.Dom.State.DISPLAY_NONE ) return 0;\r
-       if( document.getElementById ){\r
+       if( X.Dom.DOM_W3C ){\r
                // this.css( X.Dom.Style.Unit.px, 'top' );\r
                // this.css( X.Dom.Style.Unit.px, 'transisitonY' );\r
                return this._rawNode.offsetTop;\r
        } else\r
-       if( document.all ){\r
+       if( X.Dom.DOM_IE4 ){\r
                return ( this._rawNode || this._ie4getRawNode() ).offsetTop;            \r
        } else {\r
                \r