Browse Source

left布局的间距

es6
guy 3 years ago
parent
commit
5431d74efd
  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, { BI.FloatLeftLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-left", baseCls: "bi-left clearfix",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -22,19 +22,6 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.FloatLeftLayout.superclass.render.apply(this, arguments); BI.FloatLeftLayout.superclass.render.apply(this, arguments);
var o = this.options; 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); this.populate(this.options.items);
}, },
@ -77,11 +64,6 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
return w; return w;
}, },
appendFragment: function (frag) {
this.$innerDiv.append(frag);
this.element.append(this.$innerDiv);
},
resize: function () { resize: function () {
this.stroke(this.options.items); this.stroke(this.options.items);
}, },
@ -105,7 +87,7 @@ BI.shortcut("bi.left", BI.FloatLeftLayout);
BI.FloatRightLayout = BI.inherit(BI.Layout, { BI.FloatRightLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-right", baseCls: "bi-right clearfix",
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -117,19 +99,6 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
render: function () { render: function () {
BI.FloatRightLayout.superclass.render.apply(this, arguments); BI.FloatRightLayout.superclass.render.apply(this, arguments);
var o = this.options; 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); this.populate(this.options.items);
}, },
@ -172,11 +141,6 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
return w; return w;
}, },
appendFragment: function (frag) {
this.$innerDiv.append(frag);
this.element.append(this.$innerDiv);
},
resize: function () { resize: function () {
this.stroke(this.options.items); this.stroke(this.options.items);
}, },

Loading…
Cancel
Save