OSDN Git Service

Version 0.6.133, fix for closure compiler - ADVANCED_OPTIMIZATIONS
[pettanr/clientJs.git] / 0.6.x / js / 20_ui / 08_Box.js
index 4e2a112..9434254 100644 (file)
@@ -74,7 +74,7 @@ X.UI._Box = X.UI._AbstractUINode.inherits(
                                //throw new Error( 'Box を継承したインスタンスだけが _Box のオーナーになれます' );\r
                        };                      \r
                        \r
-                       this.xnode  = X.Node.create( 'div' );\r
+                       this.xnode  = X_Doc_create( 'div' );\r
                        \r
                        // すでに定義されていればそちらを採用\r
                        // supportAttrs や attrClass が、layout を元に上書きされているため\r
@@ -90,10 +90,13 @@ X.UI._Box = X.UI._AbstractUINode.inherits(
                                                //throw new Error( 'インスタンスはすでに親に追加されています ' + arg );\r
                                        };\r
                                } else\r
+                               if( arg.instanceOf && arg.instanceOf( Node ) ){\r
+                                       //this.layout = arg;\r
+                               } else\r
                                if( arg.instanceOf && arg.instanceOf( X.UI.Layout.Base ) ){\r
                                        //this.layout = arg;\r
                                } else\r
-                               if( X.Type.isObject( arg ) ){\r
+                               if( X_Type_isObject( arg ) ){\r
                                        if( attrs ){\r
                                                attrs = X_Class_override( attrs, arg );\r
                                        } else {\r
@@ -105,6 +108,7 @@ X.UI._Box = X.UI._AbstractUINode.inherits(
                        };\r
                        \r
                        for( p in attrs ){\r
+                               if( X_EMPTY_OBJECT[ p ] ) continue;\r
                                ( support = this.supportAttrs[ p ] ) && this.setAttr( p, support, attrs[ p ] );\r
                        };\r
                },\r
@@ -116,7 +120,7 @@ X.UI._Box = X.UI._AbstractUINode.inherits(
                        this.rootData   = rootData;\r
                        this.parent     = parent;\r
                        this.parentData = parentData;\r
-                       //this.xnode      = X.Node.create( 'div' );\r
+                       //this.xnode      = X_Doc_create( 'div' );\r
                        \r
                        if( i ){\r
                                for( ; i; ){\r
@@ -243,7 +247,7 @@ X.UI._Box = X.UI._AbstractUINode.inherits(
                removeAt : function( from, length ){\r
                        var uinodes = this.uinodes,\r
                                i       = uinodes.length,\r
-                               to      = from + ( X.Type.isNumber( length ) && 1 <= length ? length : 1 ),\r
+                               to      = from + ( X_Type_isNumber( length ) && 1 <= length ? length : 1 ),\r
                                node;\r
                        for( ; i; ){\r
                                node = uinodes[ --i ];\r
@@ -356,14 +360,14 @@ X.UI.Box.presets = function(){
                        privateKlass = arg;\r
                        layout = privateKlass.prototype.layout;\r
                } else\r
-               if( X.Type.isObject( arg ) ){\r
+               if( X_Type_isObject( arg ) ){\r
                        if( attrs ){\r
                                X_Class_override( attrs, arg, true );\r
                        } else {\r
                                attrs = arg;\r
                        };\r
                } else\r
-               if( X.Type.isString( arg ) ){\r
+               if( X_Type_isString( arg ) ){\r
                        boxName = arg;\r
                };\r
        };\r