From ab5d2210c91c467790a9ce89cc87574d006d518b Mon Sep 17 00:00:00 2001 From: Young Date: Fri, 14 Jul 2017 19:10:13 +0800 Subject: [PATCH] =?UTF-8?q?BI-7154=20IE8=E4=B8=8B=E7=9A=84=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/core.js | 14 ++++++++++++-- docs/core.js | 14 ++++++++++++-- src/core/wrapper/layout/adapt/float.center.js | 7 ++++++- src/core/wrapper/layout/adapt/float.horizontal.js | 7 ++++++- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/bi/core.js b/bi/core.js index 80c1913ed..a1d7fd74e 100644 --- a/bi/core.js +++ b/bi/core.js @@ -12258,15 +12258,20 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, { }, mounted: function () { + var self = this; var width = this.left.element.outerWidth(), height = this.left.element.outerHeight(); this.left.element.width(width).height(height).css("float", "none"); + BI.remove(this._children, function (i, wi) { + if (wi === self.container) { + delete self._children[i]; + } + }); BI.createWidget({ type: "bi.center_adapt", element: this, items: [this.left] }); - this.removeWidget(this.container); }, stroke: function (items) { @@ -12321,15 +12326,20 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, { }, mounted: function () { + var self = this; var width = this.left.element.width(), height = this.left.element.height(); this.left.element.width(width).height(height).css("float", "none"); + BI.remove(this._children, function (i, wi) { + if (wi === self.container) { + delete self._children[i]; + } + }); BI.createWidget({ type: "bi.horizontal_auto", element: this, items: [this.left] }); - this.removeWidget(this.container); }, _addElement: function (i, item) { diff --git a/docs/core.js b/docs/core.js index 12ee17b0e..398c89578 100644 --- a/docs/core.js +++ b/docs/core.js @@ -25766,15 +25766,20 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, { }, mounted: function () { + var self = this; var width = this.left.element.outerWidth(), height = this.left.element.outerHeight(); this.left.element.width(width).height(height).css("float", "none"); + BI.remove(this._children, function (i, wi) { + if (wi === self.container) { + delete self._children[i]; + } + }); BI.createWidget({ type: "bi.center_adapt", element: this, items: [this.left] }); - this.removeWidget(this.container); }, stroke: function (items) { @@ -25829,15 +25834,20 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, { }, mounted: function () { + var self = this; var width = this.left.element.width(), height = this.left.element.height(); this.left.element.width(width).height(height).css("float", "none"); + BI.remove(this._children, function (i, wi) { + if (wi === self.container) { + delete self._children[i]; + } + }); BI.createWidget({ type: "bi.horizontal_auto", element: this, items: [this.left] }); - this.removeWidget(this.container); }, _addElement: function (i, item) { diff --git a/src/core/wrapper/layout/adapt/float.center.js b/src/core/wrapper/layout/adapt/float.center.js index 78f963094..b359f19e2 100644 --- a/src/core/wrapper/layout/adapt/float.center.js +++ b/src/core/wrapper/layout/adapt/float.center.js @@ -29,15 +29,20 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, { }, mounted: function () { + var self = this; var width = this.left.element.outerWidth(), height = this.left.element.outerHeight(); this.left.element.width(width).height(height).css("float", "none"); + BI.remove(this._children, function (i, wi) { + if (wi === self.container) { + delete self._children[i]; + } + }); BI.createWidget({ type: "bi.center_adapt", element: this, items: [this.left] }); - this.removeWidget(this.container); }, stroke: function (items) { diff --git a/src/core/wrapper/layout/adapt/float.horizontal.js b/src/core/wrapper/layout/adapt/float.horizontal.js index 8fd043e21..5f4cfed3a 100644 --- a/src/core/wrapper/layout/adapt/float.horizontal.js +++ b/src/core/wrapper/layout/adapt/float.horizontal.js @@ -24,15 +24,20 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, { }, mounted: function () { + var self = this; var width = this.left.element.width(), height = this.left.element.height(); this.left.element.width(width).height(height).css("float", "none"); + BI.remove(this._children, function (i, wi) { + if (wi === self.container) { + delete self._children[i]; + } + }); BI.createWidget({ type: "bi.horizontal_auto", element: this, items: [this.left] }); - this.removeWidget(this.container); }, _addElement: function (i, item) {