Browse Source

Pull request #1978: 无JIRA任务 bugfix

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

* commit '5294c034c74d4662e40e1b4f2c7a8066ded03477':
  update
  add
es6
guy 3 years ago
parent
commit
755ad87afa
  1. 7
      src/core/wrapper/layout/flex/flex.horizontal.js
  2. 7
      src/core/wrapper/layout/flex/flex.vertical.js
  3. 7
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  4. 7
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  5. 10
      src/core/wrapper/layout/layout.tape.js

7
src/core/wrapper/layout/flex/flex.horizontal.js

@ -37,7 +37,12 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? "" : item.width;
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
w.element.css({
position: "relative"
});

7
src/core/wrapper/layout/flex/flex.vertical.js

@ -36,7 +36,12 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? "" : item.height;
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = null;
}
}
w.element.css({
position: "relative"
});

7
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -33,7 +33,12 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? "" : item.width;
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
w.element.css({
position: "relative"
});

7
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

@ -33,7 +33,12 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? "" : item.height;
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = null;
}
}
w.element.css({
position: "relative"
});

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

@ -65,6 +65,11 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) {
var w = self.getWidgetByName(self._getChildName(i));
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = item.width;
}
}
if (BI.isNull(left[i])) {
var preColumnSize = o.columnSize.length > 0 ? o.columnSize[i - 1] : items[i - 1].width;
left[i] = left[i - 1] + preColumnSize + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
@ -191,6 +196,11 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) {
var w = self.getWidgetByName(self._getChildName(i));
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = item.height;
}
}
if (BI.isNull(top[i])) {
var preRowSize = o.rowSize.length > 0 ? o.rowSize[i - 1] : items[i - 1].height;
top[i] = top[i - 1] + preRowSize + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;

Loading…
Cancel
Save