Browse Source

Pull request #2514: 无JIRA任务 chore: 优化布局

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

* commit 'b38da911c66a80b5c34f5d7ac8bf67b536e46ab7':
  chore: 优化布局
es6
guy 3 years ago
parent
commit
ddeadbf90e
  1. 14
      src/base/layer/layer.popup.js
  2. 22
      src/core/wrapper/layout.js
  3. 4
      src/core/wrapper/layout/adapt/absolute.horizontal.js
  4. 4
      src/core/wrapper/layout/adapt/absolute.leftrightvertical.js
  5. 4
      src/core/wrapper/layout/adapt/absolute.vertical.js
  6. 4
      src/core/wrapper/layout/adapt/adapt.center.js
  7. 16
      src/core/wrapper/layout/adapt/adapt.leftrightvertical.js
  8. 4
      src/core/wrapper/layout/adapt/adapt.vertical.js
  9. 4
      src/core/wrapper/layout/adapt/inline.center.js
  10. 4
      src/core/wrapper/layout/adapt/inline.horizontal.js
  11. 4
      src/core/wrapper/layout/adapt/inline.vertical.js
  12. 4
      src/core/wrapper/layout/flex/flex.center.js
  13. 4
      src/core/wrapper/layout/flex/flex.horizontal.center.js
  14. 4
      src/core/wrapper/layout/flex/flex.leftrightvertical.center.js
  15. 4
      src/core/wrapper/layout/flex/flex.vertical.center.js
  16. 4
      src/core/wrapper/layout/float/float.absolute.horizontal.js
  17. 4
      src/core/wrapper/layout/float/float.absolute.leftrightvertical.js
  18. 4
      src/core/wrapper/layout/float/float.absolute.vertical.js
  19. 4
      src/core/wrapper/layout/float/float.horizontal.js
  20. 8
      src/core/wrapper/layout/layout.flow.js
  21. 6
      src/core/wrapper/layout/layout.inline.js
  22. 16
      src/core/wrapper/layout/layout.tape.js
  23. 2
      src/widget/downlist/popup.downlist.js
  24. 2
      src/widget/multilayerdownlist/popup.downlist.js
  25. 4
      typescript/shims-tsx.ts

14
src/base/layer/layer.popup.js

@ -22,8 +22,8 @@ BI.PopupView = BI.inherit(BI.Widget, {
bgap: 0, bgap: 0,
vgap: 0, vgap: 0,
hgap: 0, hgap: 0,
innerVGap: 0, innerVgap: 0,
innerHGap: 0, innerHgap: 0,
showArrow: false, showArrow: false,
direction: BI.Direction.Top, // 工具栏的方向 direction: BI.Direction.Top, // 工具栏的方向
stopEvent: false, // 是否停止mousedown、mouseup事件 stopEvent: false, // 是否停止mousedown、mouseup事件
@ -134,10 +134,10 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}); this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({ this.button_group.element.css({
"min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight, "min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight,
"padding-top": o.innerVGap / BI.pixRatio + BI.pixUnit, "padding-top": o.innerVgap / BI.pixRatio + BI.pixUnit,
"padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit, "padding-bottom": o.innerVgap / BI.pixRatio + BI.pixUnit,
"padding-left": o.innerHGap / BI.pixRatio + BI.pixUnit, "padding-left": o.innerHgap / BI.pixRatio + BI.pixUnit,
"padding-right": o.innerHGap / BI.pixRatio + BI.pixUnit "padding-right": o.innerHgap / BI.pixRatio + BI.pixUnit
}); });
return this.button_group; return this.button_group;
}, },
@ -397,7 +397,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0,
tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0,
toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0);
var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVgap;
this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.resetHeight ? this.view.resetHeight(resetHeight) :
this.view.element.css({"max-height": resetHeight / BI.pixRatio + BI.pixUnit}); this.view.element.css({"max-height": resetHeight / BI.pixRatio + BI.pixUnit});
}, },

22
src/core/wrapper/layout.js

@ -15,8 +15,8 @@ BI.Layout = BI.inherit(BI.Widget, {
scrollx: false, // true, false scrollx: false, // true, false
scrolly: false, // true, false scrolly: false, // true, false
items: [], items: [],
innerHGap: 0, innerHgap: 0,
innerVGap: 0, innerVgap: 0,
}; };
}, },
@ -286,13 +286,13 @@ BI.Layout = BI.inherit(BI.Widget, {
var o = this.options; var o = this.options;
var innerLgap, innerRgap, innerTgap, innerBgap; var innerLgap, innerRgap, innerTgap, innerBgap;
if (BI.isNull(vIndex)) { if (BI.isNull(vIndex)) {
innerTgap = innerBgap = o.innerVGap; innerTgap = innerBgap = o.innerVgap;
innerLgap = hIndex === 0 ? o.innerHGap : 0; innerLgap = hIndex === 0 ? o.innerHgap : 0;
innerRgap = hIndex === o.items.length - 1 ? o.innerHGap : 0; innerRgap = hIndex === o.items.length - 1 ? o.innerHgap : 0;
} else { } else {
innerLgap = innerRgap = o.innerHGap; innerLgap = innerRgap = o.innerHgap;
innerTgap = vIndex === 0 ? o.innerVGap : 0; innerTgap = vIndex === 0 ? o.innerVgap : 0;
innerBgap = vIndex === o.items.length - 1 ? o.innerVGap : 0; innerBgap = vIndex === o.items.length - 1 ? o.innerVgap : 0;
} }
if (o.vgap + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
var top = ((BI.isNull(vIndex) || vIndex === 0) ? o.vgap : 0) + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0); var top = ((BI.isNull(vIndex) || vIndex === 0) ? o.vgap : 0) + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0);
@ -324,9 +324,9 @@ BI.Layout = BI.inherit(BI.Widget, {
_handleReverseGap: function (w, item, index) { _handleReverseGap: function (w, item, index) {
var o = this.options; var o = this.options;
var innerLgap, innerRgap, innerTgap, innerBgap; var innerLgap, innerRgap, innerTgap, innerBgap;
innerLgap = innerRgap = o.innerHGap; innerLgap = innerRgap = o.innerHgap;
innerTgap = index === 0 ? o.innerVGap : 0; innerTgap = index === 0 ? o.innerVgap : 0;
innerBgap = index === o.items.length - 1 ? o.innerVGap : 0; innerBgap = index === o.items.length - 1 ? o.innerVgap : 0;
if (o.vgap + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { if (o.vgap + o.tgap + innerTgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
var top = (index === 0 ? o.vgap : 0) + (index === 0 ? o.tgap : 0) + innerTgap + (item.tgap || 0) + (item.vgap || 0); var top = (index === 0 ? o.vgap : 0) + (index === 0 ? o.tgap : 0) + innerTgap + (item.tgap || 0) + (item.vgap || 0);
w.element.css({ w.element.css({

4
src/core/wrapper/layout/adapt/absolute.horizontal.js

@ -38,8 +38,8 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

4
src/core/wrapper/layout/adapt/absolute.leftrightvertical.js

@ -23,8 +23,8 @@ BI.AbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
BI.AbsoluteLeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments); BI.AbsoluteLeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments);
return { return {
type: "bi.htape", type: "bi.htape",
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
ref: function (_ref) { ref: function (_ref) {
self.layout = _ref; self.layout = _ref;
}, },

4
src/core/wrapper/layout/adapt/absolute.vertical.js

@ -38,8 +38,8 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

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

@ -39,8 +39,8 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

16
src/core/wrapper/layout/adapt/adapt.leftrightvertical.js

@ -34,8 +34,8 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
if (leftRight.left || "left" in o.items) { if (leftRight.left || "left" in o.items) {
layoutArray.push({ layoutArray.push({
type: "bi.left", type: "bi.left",
lgap: o.innerHGap, lgap: o.innerHgap,
vgap: o.innerVGap, vgap: o.innerVgap,
items: [{ items: [{
el: { el: {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
@ -57,8 +57,8 @@ BI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
if (leftRight.right || "right" in o.items) { if (leftRight.right || "right" in o.items) {
layoutArray.push({ layoutArray.push({
type: "bi.right", type: "bi.right",
rgap: o.innerHGap, rgap: o.innerHgap,
vgap: o.innerVGap, vgap: o.innerVgap,
items: [{ items: [{
el: { el: {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
@ -148,8 +148,8 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
vgap: o.vgap, vgap: o.vgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable scrollable: o.scrollable
@ -202,8 +202,8 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
vgap: o.vgap, vgap: o.vgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable scrollable: o.scrollable

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

@ -39,8 +39,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

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

@ -41,8 +41,8 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

4
src/core/wrapper/layout/adapt/inline.horizontal.js

@ -41,8 +41,8 @@ BI.InlineHorizontalAdaptLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

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

@ -41,8 +41,8 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

4
src/core/wrapper/layout/flex/flex.center.js

@ -37,8 +37,8 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
items: o.items items: o.items
}; };
}, },

4
src/core/wrapper/layout/flex/flex.horizontal.center.js

@ -38,8 +38,8 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
items: o.items items: o.items
}; };
}, },

4
src/core/wrapper/layout/flex/flex.leftrightvertical.center.js

@ -29,8 +29,8 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

4
src/core/wrapper/layout/flex/flex.vertical.center.js

@ -39,8 +39,8 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
hgap: o.hgap, hgap: o.hgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
items: o.items items: o.items
}; };
}, },

4
src/core/wrapper/layout/float/float.absolute.horizontal.js

@ -36,8 +36,8 @@ BI.FloatAbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
// lgap和rgap不传的话内部不会设置left和right // lgap和rgap不传的话内部不会设置left和right
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

4
src/core/wrapper/layout/float/float.absolute.leftrightvertical.js

@ -29,8 +29,8 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
verticalAlign: o.verticalAlign, verticalAlign: o.verticalAlign,
items: this._formatItems(o.items), items: this._formatItems(o.items),
vgap: "50%", vgap: "50%",
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable scrollable: o.scrollable

4
src/core/wrapper/layout/float/float.absolute.vertical.js

@ -36,8 +36,8 @@ BI.FloatAbsoluteVerticalLayout = BI.inherit(BI.Layout, {
// tgap和bgap不传的话内部不会设置top和bottom // tgap和bgap不传的话内部不会设置top和bottom
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
}; };
}, },

4
src/core/wrapper/layout/float/float.horizontal.js

@ -51,8 +51,8 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
}], }],
horizontalAlign: o.horizontalAlign, horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign, verticalAlign: o.verticalAlign,
innerHGap: o.innerHGap, innerHgap: o.innerHgap,
innerVGap: o.innerVGap, innerVgap: o.innerVgap,
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable scrollable: o.scrollable

8
src/core/wrapper/layout/layout.flow.js

@ -22,16 +22,16 @@ 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;
if (o.innerHGap !== 0) { if (o.innerHgap !== 0) {
this.element.css({ this.element.css({
paddingLeft: this._optimiseGap(o.innerHgap), paddingLeft: this._optimiseGap(o.innerHgap),
paddingRight: this._optimiseGap(o.innerHgap) paddingRight: this._optimiseGap(o.innerHgap)
}) })
} }
if (o.innerVGap !== 0) { if (o.innerVgap !== 0) {
this.element.css({ this.element.css({
paddingTop: this._optimiseGap(o.innerVGap), paddingTop: this._optimiseGap(o.innerVgap),
paddingBottom: this._optimiseGap(o.innerVGap) paddingBottom: this._optimiseGap(o.innerVgap)
}) })
} }
this.populate(this.options.items); this.populate(this.options.items);

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

@ -52,7 +52,7 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
}); });
w.element.addClass("i-item"); w.element.addClass("i-item");
if (columnSize === "fill" || columnSize === "") { if (columnSize === "fill" || columnSize === "") {
var length = 0, gap = o.hgap + o.innerHGap; var length = 0, gap = o.hgap + o.innerHgap;
var fillCount = 0, autoCount = 0; var fillCount = 0, autoCount = 0;
for (var k = 0, len = o.columnSize.length || o.items.length; k < len; k++) { for (var k = 0, len = o.columnSize.length || o.items.length; k < len; k++) {
var cz = o.columnSize.length > 0 ? o.columnSize[k] : o.items[k].width; var cz = o.columnSize.length > 0 ? o.columnSize[k] : o.items[k].width;
@ -81,8 +81,8 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
} }
this._handleGap(w, item, i); this._handleGap(w, item, i);
if (o.verticalAlign === BI.VerticalAlign.Stretch && BI.isNull(item.height)) { if (o.verticalAlign === BI.VerticalAlign.Stretch && BI.isNull(item.height)) {
var top = o.innerVGap + o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0), var top = o.innerVgap + o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.innerVGap + o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0); bottom = o.innerVgap + o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : (top + bottom) / BI.pixRatio + BI.pixUnit; var gap = (top + bottom) > 0 && (top + bottom) < 1 ? ((top + bottom) * 100).toFixed(1) + "%" : (top + bottom) / BI.pixRatio + BI.pixUnit;
w.element.css("height", "calc(100% - " + gap + ")"); w.element.css("height", "calc(100% - " + gap + ")");
} }

16
src/core/wrapper/layout/layout.tape.js

@ -43,8 +43,8 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} }
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
top: self._optimiseGap((item.vgap || 0) + (item.tgap || 0) + o.innerVGap + o.vgap + o.tgap), top: self._optimiseGap((item.vgap || 0) + (item.tgap || 0) + o.innerVgap + o.vgap + o.tgap),
bottom: self._optimiseGap((item.bgap || 0) + (item.vgap || 0) + o.innerVGap + o.vgap + o.bgap) bottom: self._optimiseGap((item.bgap || 0) + (item.vgap || 0) + o.innerVgap + o.vgap + o.bgap)
}); });
if (o.verticalAlign === BI.VerticalAlign.Middle) { if (o.verticalAlign === BI.VerticalAlign.Middle) {
w.element.css({ w.element.css({
@ -59,8 +59,8 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
}); });
var left = {}, right = {}; var left = {}, right = {};
left[0] = o.innerHGap; left[0] = o.innerHgap;
right[items.length - 1] = o.innerHGap; right[items.length - 1] = o.innerHgap;
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {
@ -163,8 +163,8 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} }
w.element.css({ w.element.css({
position: "absolute", position: "absolute",
left: self._optimiseGap((item.lgap || 0) + (item.hgap || 0) + o.innerHGap + o.hgap + o.lgap), left: self._optimiseGap((item.lgap || 0) + (item.hgap || 0) + o.innerHgap + o.hgap + o.lgap),
right: self._optimiseGap((item.hgap || 0) + (item.rgap || 0) + o.innerHGap + o.hgap + o.rgap) right: self._optimiseGap((item.hgap || 0) + (item.rgap || 0) + o.innerHgap + o.hgap + o.rgap)
}); });
if (o.horizontalAlign === BI.HorizontalAlign.Center) { if (o.horizontalAlign === BI.HorizontalAlign.Center) {
w.element.css({ w.element.css({
@ -179,8 +179,8 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
}); });
var top = {}, bottom = {}; var top = {}, bottom = {};
top[0] = o.innerVGap; top[0] = o.innerVgap;
bottom[items.length - 1] = o.innerVGap; bottom[items.length - 1] = o.innerVgap;
BI.any(items, function (i, item) { BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) { if (BI.isEmptyObject(item)) {

2
src/widget/downlist/popup.downlist.js

@ -110,7 +110,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
}] }]
}, },
innerVGap: 5, innerVgap: 5,
maxHeight: 378 maxHeight: 378
}; };
item.el.childValues = []; item.el.childValues = [];

2
src/widget/multilayerdownlist/popup.downlist.js

@ -107,7 +107,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
}] }]
}, },
innerVGap: 5, innerVgap: 5,
maxHeight: 378, maxHeight: 378,
}; };
self._createChildren(item); self._createChildren(item);

4
typescript/shims-tsx.ts

@ -19,8 +19,8 @@ interface UIProps {
interface AdditionalProps { interface AdditionalProps {
column: number; column: number;
row: number; row: number;
innerVGap: number; innerVgap: number;
innerHGap: number; innerHgap: number;
} }
interface ElementClassProps<T> extends UIProps { interface ElementClassProps<T> extends UIProps {

Loading…
Cancel
Save