Browse Source

Pull request #1878: 无JIRA任务 stretch能够根据是否有滚动条能够动态选择,而不需要主动选择,为table_adapt兼容作准备

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

* commit '1b69dfb7125981e6f08213d0ad4e33c71375b265':
  stretch能够根据是否有滚动条能够动态选择,而不需要主动选择
es6
guy 4 years ago
parent
commit
d0cec249dc
  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
src/core/wrapper/layout/flex/flex.horizontal.js

@ -40,15 +40,18 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "relative"
});
if (o.columnSize[i] !== "auto") {
if (o.columnSize[i] === "fill" || o.columnSize[i] === "") {
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) {
if (o.scrollable === true || o.scrollx === true) {
w.element.addClass("f-s-n");
}
}
} else {
w.element.addClass("f-s-n");
}
}
if (o.columnSize[i] > 0) {
w.element.addClass("f-s-n");
w.element.width(o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)));
}
if (o.columnSize[i] === "fill") {

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

@ -39,15 +39,18 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "relative"
});
if (o.columnSize[i] !== "auto") {
if (o.rowSize[i] === "fill" || o.rowSize[i] === "") {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
if (o.scrollable === true || o.scrolly === true) {
w.element.addClass("f-s-n");
}
}
} else {
w.element.addClass("f-s-n");
}
}
if (o.rowSize[i] > 0) {
w.element.addClass("f-s-n");
w.element.height(o.rowSize[i] === "" ? "" : (o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)));
}
if (o.rowSize[i] === "fill") {

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

@ -36,15 +36,18 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "relative"
});
if (o.columnSize[i] !== "auto") {
if (o.columnSize[i] === "fill" || o.columnSize[i] === "") {
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) {
if (o.scrollable === true || o.scrollx === true) {
w.element.addClass("f-s-n");
}
}
} else {
w.element.addClass("f-s-n");
}
}
if (o.columnSize[i] > 0) {
w.element.addClass("f-s-n");
w.element.width(o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)));
}
if (o.columnSize[i] === "fill") {

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

@ -36,15 +36,18 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "relative"
});
if (o.columnSize[i] !== "auto") {
if (o.rowSize[i] === "fill" || o.rowSize[i] === "") {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
if (o.scrollable === true || o.scrolly === true) {
w.element.addClass("f-s-n");
}
}
} else {
w.element.addClass("f-s-n");
}
}
if (o.rowSize[i] > 0) {
w.element.addClass("f-s-n");
w.element.height(o.rowSize[i] === "" ? "" : (o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)));
}
if (o.rowSize[i] === "fill") {

Loading…
Cancel
Save