guy 3 years ago
parent
commit
501e061110
  1. 5
      src/core/wrapper/layout/flex/flex.horizontal.js
  2. 5
      src/core/wrapper/layout/flex/flex.vertical.js
  3. 5
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  4. 5
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  5. 10
      src/core/wrapper/layout/layout.tape.js

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

@ -38,6 +38,11 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); 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 ? "" : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = "";
}
}
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });

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

@ -37,6 +37,11 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments); 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 ? "" : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = "";
}
}
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });

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

@ -34,6 +34,11 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments); 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 ? "" : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = "";
}
}
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });

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

@ -34,6 +34,11 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments); 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 ? "" : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = "";
}
}
w.element.css({ w.element.css({
position: "relative" 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) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self._getChildName(i)); var w = self.getWidgetByName(self._getChildName(i));
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; 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])) { if (BI.isNull(left[i])) {
var preColumnSize = o.columnSize.length > 0 ? o.columnSize[i - 1] : items[i - 1].width; 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; 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) { BI.any(items, function (i, item) {
var w = self.getWidgetByName(self._getChildName(i)); var w = self.getWidgetByName(self._getChildName(i));
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height; 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])) { if (BI.isNull(top[i])) {
var preRowSize = o.rowSize.length > 0 ? o.rowSize[i - 1] : items[i - 1].height; 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; 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