Roo/tree/TreeNode.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 6 Sep 2011 06:50:48 +0000 (14:50 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 6 Sep 2011 06:50:48 +0000 (14:50 +0800)
Roo/tree/TreeNode.js

index 2072d7c..bd96f85 100644 (file)
  * @cfg {Boolean} singleClickExpand True for single click expand on this node
  * @cfg {Function} uiProvider A UI <b>class</b> to use for this node (defaults to Roo.tree.TreeNodeUI)
  * @cfg {Boolean} checked True to render a checked checkbox for this node, false to render an unchecked checkbox
- * @cfg {Array} children Array of Children to be added when created..
-  
  * (defaults to undefined with no checkbox rendered)
  * @constructor
  * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node
  */
-Roo.tree.TreeNode = function(attributes)
-{
+Roo.tree.TreeNode = function(attributes){
     attributes = attributes || {};
     if(typeof attributes == "string"){
         attributes = {text: attributes};
@@ -153,17 +150,8 @@ Roo.tree.TreeNode = function(attributes)
      * @type TreeNodeUI
      */
     this.ui = new uiClass(this);
-     
-    if (attributes.children) {
-        Roo.each(attributes.children, function(c) {
-            this.appendChild(new Roo.tree.TreeNode(c));
-        }, this);
-    }
-    
 };
 Roo.extend(Roo.tree.TreeNode, Roo.data.Node, {
-    
-    
     preventHScroll: true,
     /**
      * Returns true if this node is expanded