Browse Source

Pull request #1458: 无JIRA任务 整理一下

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

* commit '7c77b249040f571d4c1560df76c9dcb1a42ddecf':
  bugfix
  bugfix
es6
guy 4 years ago
parent
commit
d8e5df193d
  1. 5
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  2. 4
      src/core/wrapper/layout/adapt/adapt.table.js
  3. 3
      src/core/wrapper/layout/adapt/inline.center.js
  4. 6
      src/core/wrapper/layout/adapt/inline.vertical.js

5
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -8,7 +8,6 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-horizontal-adapt-layout", baseCls: "bi-horizontal-adapt-layout",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
columnSize: [], columnSize: [],
scrollx: false, scrollx: false,
hgap: 0, hgap: 0,
@ -24,8 +23,8 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments); BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments);
return { return {
type: "bi.horizontal", type: "bi.horizontal",
verticalAlign: BI.VerticalAlign.Top, verticalAlign: o.verticalAlign,
horizontalAlign: o.horizontalAlign, horizontalAlign: BI.HorizontalAlign.Stretch,
columnSize: o.columnSize, columnSize: o.columnSize,
items: o.items, items: o.items,
scrollx: o.scrollx, scrollx: o.scrollx,

4
src/core/wrapper/layout/adapt/adapt.table.js

@ -25,8 +25,8 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
this.$table = BI.Widget._renderEngine.createElement("<div>").css({ this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative", position: "relative",
display: "table", display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto", width: (o.horizontalAlign === BI.HorizontalAlign.Center || BI.HorizontalAlign.Stretch) ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto", height: (o.verticalAlign === BI.VerticalAlign.Middle || o.verticalAlign === BI.VerticalAlign.Stretch) ? "100%" : "auto",
"white-space": "nowrap" "white-space": "nowrap"
}); });
this.populate(this.options.items); this.populate(this.options.items);

3
src/core/wrapper/layout/adapt/inline.center.js

@ -12,6 +12,7 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout", baseCls: "bi-inline-center-adapt-layout",
horizontalAlign: BI.HorizontalAlign.Center,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -25,7 +26,7 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments); BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({ this.element.css({
whiteSpace: "nowrap", whiteSpace: "nowrap",
textAlign: "center" textAlign: o.horizontalAlign
}); });
this.populate(this.options.items); this.populate(this.options.items);
}, },

6
src/core/wrapper/layout/adapt/inline.vertical.js

@ -12,13 +12,13 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-vertical-adapt-layout", baseCls: "bi-inline-vertical-adapt-layout",
horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,
tgap: 0, tgap: 0,
bgap: 0, bgap: 0
horizontalAlign: "left"
}); });
}, },
@ -29,7 +29,7 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
textAlign: o.horizontalAlign textAlign: o.horizontalAlign
}); });
this.populate(this.options.items); this.populate(o.items);
}, },
_addElement: function (i, item) { _addElement: function (i, item) {

Loading…
Cancel
Save