From 8963b05a4c9e22a130e4885ef141b2c74191bd06 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 17 May 2017 02:28:51 +0800 Subject: [PATCH] update --- bi/core.js | 40 +++++++++++++++++++++------------------- docs/core.js | 40 +++++++++++++++++++++------------------- src/core/widget.js | 40 +++++++++++++++++++++------------------- 3 files changed, 63 insertions(+), 57 deletions(-) diff --git a/bi/core.js b/bi/core.js index 978910858..698ed4b32 100644 --- a/bi/core.js +++ b/bi/core.js @@ -4497,17 +4497,6 @@ BI.Widget = BI.inherit(BI.OB, { _mountChildren: null, - _unMount: function () { - BI.each(this._children, function (i, widget) { - widget._unMount && widget._unMount(); - }); - this._children = {}; - this._parent = null; - this._isMounted = false; - this.purgeListeners(); - this.destroyed && this.destroyed(); - }, - isMounted: function () { return this._isMounted; }, @@ -4687,6 +4676,21 @@ BI.Widget = BI.inherit(BI.OB, { this.setVisible(true); }, + __d: function () { + BI.each(this._children, function (i, widget) { + widget._unMount && widget._unMount(); + }); + this._children = {}; + this._parent = null; + this._isMounted = false; + }, + + _unMount: function () { + this.__d(); + this.purgeListeners(); + this.destroyed && this.destroyed(); + }, + isolate: function () { if (this._parent) { this._parent.removeWidget(this); @@ -4702,19 +4706,17 @@ BI.Widget = BI.inherit(BI.OB, { this.element.empty(); }, - _destroy: function(){ - BI.each(this._children, function (i, widget) { - widget._unMount && widget._unMount(); - }); - this._children = {}; - this._parent = null; - this._isMounted = false; + _destroy: function () { + this.__d(); this.destroyed && this.destroyed(); this.element.destroy(); + this.purgeListeners(); }, destroy: function () { - this._destroy(); + this.__d(); + this.destroyed && this.destroyed(); + this.element.destroy(); this.fireEvent(BI.Events.DESTROY); this.purgeListeners(); } diff --git a/docs/core.js b/docs/core.js index c967d63bf..b2b82e182 100644 --- a/docs/core.js +++ b/docs/core.js @@ -14492,17 +14492,6 @@ BI.Widget = BI.inherit(BI.OB, { _mountChildren: null, - _unMount: function () { - BI.each(this._children, function (i, widget) { - widget._unMount && widget._unMount(); - }); - this._children = {}; - this._parent = null; - this._isMounted = false; - this.purgeListeners(); - this.destroyed && this.destroyed(); - }, - isMounted: function () { return this._isMounted; }, @@ -14682,6 +14671,21 @@ BI.Widget = BI.inherit(BI.OB, { this.setVisible(true); }, + __d: function () { + BI.each(this._children, function (i, widget) { + widget._unMount && widget._unMount(); + }); + this._children = {}; + this._parent = null; + this._isMounted = false; + }, + + _unMount: function () { + this.__d(); + this.purgeListeners(); + this.destroyed && this.destroyed(); + }, + isolate: function () { if (this._parent) { this._parent.removeWidget(this); @@ -14697,19 +14701,17 @@ BI.Widget = BI.inherit(BI.OB, { this.element.empty(); }, - _destroy: function(){ - BI.each(this._children, function (i, widget) { - widget._unMount && widget._unMount(); - }); - this._children = {}; - this._parent = null; - this._isMounted = false; + _destroy: function () { + this.__d(); this.destroyed && this.destroyed(); this.element.destroy(); + this.purgeListeners(); }, destroy: function () { - this._destroy(); + this.__d(); + this.destroyed && this.destroyed(); + this.element.destroy(); this.fireEvent(BI.Events.DESTROY); this.purgeListeners(); } diff --git a/src/core/widget.js b/src/core/widget.js index 464008cc7..2ba806a87 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -170,17 +170,6 @@ BI.Widget = BI.inherit(BI.OB, { _mountChildren: null, - _unMount: function () { - BI.each(this._children, function (i, widget) { - widget._unMount && widget._unMount(); - }); - this._children = {}; - this._parent = null; - this._isMounted = false; - this.purgeListeners(); - this.destroyed && this.destroyed(); - }, - isMounted: function () { return this._isMounted; }, @@ -360,6 +349,21 @@ BI.Widget = BI.inherit(BI.OB, { this.setVisible(true); }, + __d: function () { + BI.each(this._children, function (i, widget) { + widget._unMount && widget._unMount(); + }); + this._children = {}; + this._parent = null; + this._isMounted = false; + }, + + _unMount: function () { + this.__d(); + this.purgeListeners(); + this.destroyed && this.destroyed(); + }, + isolate: function () { if (this._parent) { this._parent.removeWidget(this); @@ -375,19 +379,17 @@ BI.Widget = BI.inherit(BI.OB, { this.element.empty(); }, - _destroy: function(){ - BI.each(this._children, function (i, widget) { - widget._unMount && widget._unMount(); - }); - this._children = {}; - this._parent = null; - this._isMounted = false; + _destroy: function () { + this.__d(); this.destroyed && this.destroyed(); this.element.destroy(); + this.purgeListeners(); }, destroy: function () { - this._destroy(); + this.__d(); + this.destroyed && this.destroyed(); + this.element.destroy(); this.fireEvent(BI.Events.DESTROY); this.purgeListeners(); }