guy 4 years ago
parent
commit
4706faf977
  1. 16
      src/core/platform/web/config.js

16
src/core/platform/web/config.js

@ -38,25 +38,25 @@ BI.prepares.push(function () {
}); });
BI.Plugin.configWidget("bi.center_adapt", function (ob) { BI.Plugin.configWidget("bi.center_adapt", function (ob) {
var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1); var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch; // var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
if (!isAdapt || justOneItem) { // if (!isAdapt || justOneItem) {
if (supportFlex) { if (supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_center_adapt"}); return BI.extend({}, ob, {type: "bi.flex_center_adapt"});
} }
return BI.extend({}, ob, {type: "bi.inline_center_adapt"}); return BI.extend({}, ob, {type: "bi.inline_center_adapt"});
} // }
return ob; // return ob;
}); });
BI.Plugin.configWidget("bi.vertical_adapt", function (ob) { BI.Plugin.configWidget("bi.vertical_adapt", function (ob) {
var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1); var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch; // var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
if (!isAdapt || justOneItem) { // if (!isAdapt || justOneItem) {
if (supportFlex) { if (supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"}); return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"});
} }
return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"}); return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"});
} // }
return ob; // return ob;
}); });
BI.Plugin.configWidget("bi.horizontal_adapt", function (ob) { BI.Plugin.configWidget("bi.horizontal_adapt", function (ob) {
var justOneItem = (ob.items && ob.items.length <= 1); var justOneItem = (ob.items && ob.items.length <= 1);

Loading…
Cancel
Save