guy 4 years ago
parent
commit
029b546642
  1. 12
      src/base/single/label/abstract.label.js
  2. 2
      src/core/wrapper/layout/flex/flex.horizontal.js
  3. 2
      src/core/wrapper/layout/flex/flex.vertical.js
  4. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  5. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

12
src/base/single/label/abstract.label.js

@ -59,6 +59,7 @@
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
height: o.height, height: o.height,
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [ items: [
@ -71,6 +72,7 @@
} }
BI.createWidget({ // 1.2 BI.createWidget({ // 1.2
type: "bi.center_adapt", type: "bi.center_adapt",
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [ items: [
@ -93,6 +95,7 @@
this.text = BI.createWidget(json); this.text = BI.createWidget(json);
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
@ -127,6 +130,7 @@
this.text = BI.createWidget(json); this.text = BI.createWidget(json);
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [this.text] items: [this.text]
@ -137,6 +141,7 @@
json.maxWidth = o.textWidth; json.maxWidth = o.textWidth;
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
items: [ items: [
@ -159,6 +164,7 @@
this.text = BI.createWidget(json); this.text = BI.createWidget(json);
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
columnSize: [""], // important让文字shrink为1
scrollable: true, scrollable: true,
element: this, element: this,
items: [this.text] items: [this.text]
@ -195,6 +201,7 @@
})); }));
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
columnSize: [""], // important让文字shrink为1
element: this, element: this,
items: [this.text] items: [this.text]
}); });
@ -211,6 +218,7 @@
BI.createWidget({ BI.createWidget({
type: adaptLayout, type: adaptLayout,
horizontalAlign: o.textAlign, horizontalAlign: o.textAlign,
columnSize: [""], // important让文字shrink为1
height: o.height, height: o.height,
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
element: this, element: this,
@ -225,6 +233,7 @@
BI.createWidget({ // 2.2 BI.createWidget({ // 2.2
type: adaptLayout, type: adaptLayout,
horizontalAlign: o.textAlign, horizontalAlign: o.textAlign,
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
@ -262,6 +271,7 @@
BI.createWidget({ // 2.4 BI.createWidget({ // 2.4
type: adaptLayout, type: adaptLayout,
horizontalAlign: o.textAlign, horizontalAlign: o.textAlign,
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
@ -281,6 +291,7 @@
BI.createWidget({ // 2.5 BI.createWidget({ // 2.5
type: adaptLayout, type: adaptLayout,
horizontalAlign: o.textAlign, horizontalAlign: o.textAlign,
columnSize: [""], // important让文字shrink为1
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
@ -329,6 +340,7 @@
BI.createWidget({ BI.createWidget({
type: adaptLayout, type: adaptLayout,
horizontalAlign: o.textAlign, horizontalAlign: o.textAlign,
columnSize: [""], // important让文字shrink为1
element: this, element: this,
scrollable: o.whiteSpace === "normal", scrollable: o.whiteSpace === "normal",
items: [this.text] items: [this.text]

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

@ -34,7 +34,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) { if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") {
w.element.css({ w.element.css({
"flex-shrink": "0" "flex-shrink": "0"
}); });

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

@ -33,7 +33,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.verticalAlign !== BI.VerticalAlign.Stretch) { if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "") {
w.element.css({ w.element.css({
"flex-shrink": "0" "flex-shrink": "0"
}); });

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

@ -35,7 +35,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) { if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") {
w.element.css({ w.element.css({
"flex-shrink": "0" "flex-shrink": "0"
}); });

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

@ -35,7 +35,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.verticalAlign !== BI.VerticalAlign.Stretch) { if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "") {
w.element.css({ w.element.css({
"flex-shrink": "0" "flex-shrink": "0"
}); });

Loading…
Cancel
Save