From 5431d74efd2ea6ea7b54d813978f27f9b97dcb44 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 31 May 2021 13:53:34 +0800 Subject: [PATCH] =?UTF-8?q?left=E5=B8=83=E5=B1=80=E7=9A=84=E9=97=B4?= =?UTF-8?q?=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout/layout.flow.js | 40 ++------------------------ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/src/core/wrapper/layout/layout.flow.js b/src/core/wrapper/layout/layout.flow.js index e64e78a5f..be0ff5481 100644 --- a/src/core/wrapper/layout/layout.flow.js +++ b/src/core/wrapper/layout/layout.flow.js @@ -10,7 +10,7 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, { props: function () { return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), { - baseCls: "bi-left", + baseCls: "bi-left clearfix", hgap: 0, vgap: 0, lgap: 0, @@ -22,19 +22,6 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, { render: function () { BI.FloatLeftLayout.superclass.render.apply(this, arguments); var o = this.options; - this.$innerDiv = BI.Widget._renderEngine.createElement("
").addClass("clearfix"); - if (o.hgap > 0) { - this.$innerDiv.css({ - "padding-left": o.hgap / 2 / BI.pixRatio + BI.pixUnit, - "padding-right": o.hgap / 2 / BI.pixRatio + BI.pixUnit - }); - } - if (o.vgap > 0) { - this.$innerDiv.css({ - "padding-top": o.vgap / 2 / BI.pixRatio + BI.pixUnit, - "padding-bottom": o.vgap / 2 / BI.pixRatio + BI.pixUnit - }); - } this.populate(this.options.items); }, @@ -77,11 +64,6 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, { return w; }, - appendFragment: function (frag) { - this.$innerDiv.append(frag); - this.element.append(this.$innerDiv); - }, - resize: function () { this.stroke(this.options.items); }, @@ -105,7 +87,7 @@ BI.shortcut("bi.left", BI.FloatLeftLayout); BI.FloatRightLayout = BI.inherit(BI.Layout, { props: function () { return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), { - baseCls: "bi-right", + baseCls: "bi-right clearfix", hgap: 0, vgap: 0, lgap: 0, @@ -117,19 +99,6 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, { render: function () { BI.FloatRightLayout.superclass.render.apply(this, arguments); var o = this.options; - this.$innerDiv = BI.Widget._renderEngine.createElement("
").addClass("clearfix"); - if (o.hgap > 0) { - this.$innerDiv.css({ - "padding-left": o.hgap / 2 / BI.pixRatio + BI.pixUnit, - "padding-right": o.hgap / 2 / BI.pixRatio + BI.pixUnit - }); - } - if (o.vgap > 0) { - this.$innerDiv.css({ - "padding-top": o.vgap / 2 / BI.pixRatio + BI.pixUnit, - "padding-bottom": o.vgap / 2 / BI.pixRatio + BI.pixUnit - }); - } this.populate(this.options.items); }, @@ -172,11 +141,6 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, { return w; }, - appendFragment: function (frag) { - this.$innerDiv.append(frag); - this.element.append(this.$innerDiv); - }, - resize: function () { this.stroke(this.options.items); },