diff --git a/bi/base.js b/bi/base.js index 0efb36640..00175165d 100644 --- a/bi/base.js +++ b/bi/base.js @@ -1520,7 +1520,6 @@ BI.TreeView = BI.inherit(BI.Pane, { _init: function () { BI.TreeView.superclass._init.apply(this, arguments); this._stop = false; - this.container = BI.createWidget(); this._createTree(); this.tip = BI.createWidget({ @@ -1533,7 +1532,7 @@ BI.TreeView = BI.inherit(BI.Pane, { scrollable: true, scrolly: false, element: this, - items: [this.container, this.tip] + items: [this.tip] }); }, @@ -1552,7 +1551,7 @@ BI.TreeView = BI.inherit(BI.Pane, { }); BI.createWidget({ type: "bi.default", - element: this.container, + element: this.element, items: [this.tree] }); }, @@ -1947,6 +1946,7 @@ BI.TreeView = BI.inherit(BI.Pane, { setNode(child.children); }); } + BI.each(this.nodes.getNodes(), function (i, node) { node.halfCheck = false; setNode(node.children); diff --git a/docs/base.js b/docs/base.js index 0efb36640..00175165d 100644 --- a/docs/base.js +++ b/docs/base.js @@ -1520,7 +1520,6 @@ BI.TreeView = BI.inherit(BI.Pane, { _init: function () { BI.TreeView.superclass._init.apply(this, arguments); this._stop = false; - this.container = BI.createWidget(); this._createTree(); this.tip = BI.createWidget({ @@ -1533,7 +1532,7 @@ BI.TreeView = BI.inherit(BI.Pane, { scrollable: true, scrolly: false, element: this, - items: [this.container, this.tip] + items: [this.tip] }); }, @@ -1552,7 +1551,7 @@ BI.TreeView = BI.inherit(BI.Pane, { }); BI.createWidget({ type: "bi.default", - element: this.container, + element: this.element, items: [this.tree] }); }, @@ -1947,6 +1946,7 @@ BI.TreeView = BI.inherit(BI.Pane, { setNode(child.children); }); } + BI.each(this.nodes.getNodes(), function (i, node) { node.halfCheck = false; setNode(node.children); diff --git a/src/base/tree/treeview.js b/src/base/tree/treeview.js index 6ada95083..118a65088 100644 --- a/src/base/tree/treeview.js +++ b/src/base/tree/treeview.js @@ -15,7 +15,6 @@ BI.TreeView = BI.inherit(BI.Pane, { _init: function () { BI.TreeView.superclass._init.apply(this, arguments); this._stop = false; - this.container = BI.createWidget(); this._createTree(); this.tip = BI.createWidget({ @@ -28,7 +27,7 @@ BI.TreeView = BI.inherit(BI.Pane, { scrollable: true, scrolly: false, element: this, - items: [this.container, this.tip] + items: [this.tip] }); }, @@ -47,7 +46,7 @@ BI.TreeView = BI.inherit(BI.Pane, { }); BI.createWidget({ type: "bi.default", - element: this.container, + element: this.element, items: [this.tree] }); }, @@ -442,6 +441,7 @@ BI.TreeView = BI.inherit(BI.Pane, { setNode(child.children); }); } + BI.each(this.nodes.getNodes(), function (i, node) { node.halfCheck = false; setNode(node.children);