Browse Source

Pull request #1941: 无JIRA任务 left布局的间距

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'a0dc9b883dda5fcd16f21dcbd64f559cb16f27d2':
  left布局的间距
es6
guy 3 years ago
parent
commit
fd06fb228a
  1. 40
      src/core/wrapper/layout/layout.flow.js

40
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("<div>").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("<div>").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);
},

Loading…
Cancel
Save