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

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

@ -2,13 +2,6 @@
* Created by dailer on 2019/6/19.
*/
!(function () {
var _isSupportFlex;
var isSupportFlex = function () {
if (_isSupportFlex == null) {
_isSupportFlex = !!(BI.isSupportCss3 && BI.isSupportCss3("flex"));
}
return _isSupportFlex;
};
BI.AbstractLabel = BI.inherit(BI.Single, {
_defaultConfig: function (props) {

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

@ -32,9 +32,13 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "relative",
position: "relative"
});
if (o.horizontalAlign === BI.HorizontalAlign.Left || o.horizontalAlign === BI.HorizontalAlign.Right) {
w.element.css({
"flex-shrink": "0"
});
}
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i]);
}

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

@ -31,9 +31,13 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);
var o = this.options;
w.element.css({
position: "relative",
position: "relative"
});
if (o.verticalAlign === BI.VerticalAlign.Top || o.verticalAlign === BI.VerticalAlign.Bottom) {
w.element.css({
"flex-shrink": "0"
});
}
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : o.rowSize[i]);
}

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

@ -33,9 +33,13 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "relative",
position: "relative"
});
if (o.horizontalAlign === BI.HorizontalAlign.Left || o.horizontalAlign === BI.HorizontalAlign.Right) {
w.element.css({
"flex-shrink": "0"
});
}
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i]);
}

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

@ -33,9 +33,13 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "relative",
position: "relative"
});
if (o.verticalAlign === BI.VerticalAlign.Top || o.verticalAlign === BI.VerticalAlign.Bottom) {
w.element.css({
"flex-shrink": "0"
});
}
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : o.rowSize[i]);
}

Loading…
Cancel
Save