Browse Source

Pull request #2048: 无JIRA任务 bugfix

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

* commit '746adb533d06e309c135e2ae69231d3d214688e5':
  bugfix
  bugfix
es6
guy 3 years ago
parent
commit
74cc49eee4
  1. 7
      src/core/wrapper/layout/float/float.absolute.horizontal.js
  2. 17
      src/core/wrapper/layout/float/float.absolute.leftrightvertical.js
  3. 7
      src/core/wrapper/layout/float/float.absolute.vertical.js

7
src/core/wrapper/layout/float/float.absolute.horizontal.js

@ -39,12 +39,15 @@ BI.FloatAbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
}, },
_formatItems: function (items) { _formatItems: function (items) {
if (this.options.horizontalAlign !== BI.HorizontalAlign.Center) {
return items;
}
return BI.map(items, function (i, item) { return BI.map(items, function (i, item) {
if(!item || BI.isEmptyObject(item)){ if (!item || BI.isEmptyObject(item)) {
return item; return item;
} }
var el = BI.stripEL(item); var el = BI.stripEL(item);
if(BI.isWidget(el)){ if (BI.isWidget(el)) {
el.element.addClass("bi-abs-c-x-item"); el.element.addClass("bi-abs-c-x-item");
} else { } else {
el.cls = (el.cls || "") + "bi-abs-c-x-item"; el.cls = (el.cls || "") + "bi-abs-c-x-item";

17
src/core/wrapper/layout/float/float.absolute.leftrightvertical.js

@ -41,11 +41,13 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
var rightItems = o.items.right || []; var rightItems = o.items.right || [];
leftItems = BI.map(leftItems, function (i, item) { leftItems = BI.map(leftItems, function (i, item) {
var el = BI.stripEL(item); var el = BI.stripEL(item);
if(BI.isWidget(el)){ if (o.verticalAlign === BI.VerticalAlign.Middle) {
if (BI.isWidget(el)) {
el.element.addClass("bi-abs-c-y-item"); el.element.addClass("bi-abs-c-y-item");
} else { } else {
el.cls = (el.cls || "") + "bi-abs-c-y-item"; el.cls = (el.cls || "") + "bi-abs-c-y-item";
} }
}
var json = { var json = {
el: el, el: el,
width: item.width width: item.width
@ -66,11 +68,13 @@ BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
}); });
rightItems = BI.map(rightItems, function (i, item) { rightItems = BI.map(rightItems, function (i, item) {
var el = BI.stripEL(item); var el = BI.stripEL(item);
if(BI.isWidget(el)){ if (o.verticalAlign === BI.VerticalAlign.Middle) {
if (BI.isWidget(el)) {
el.element.addClass("bi-abs-c-y-item"); el.element.addClass("bi-abs-c-y-item");
} else { } else {
el.cls = (el.cls || "") + "bi-abs-c-y-item"; el.cls = (el.cls || "") + "bi-abs-c-y-item";
} }
}
var json = { var json = {
el: el, el: el,
width: item.width width: item.width
@ -116,7 +120,7 @@ BI.FloatAbsoluteRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
items: [], items: [],
lgap: 0, lgap: 0,
rgap: 0, rgap: 0,
hgap: 0, hgap: 0
}); });
}, },
render: function () { render: function () {
@ -140,12 +144,15 @@ BI.FloatAbsoluteRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
_formatItems: function (items) { _formatItems: function (items) {
if (this.options.verticalAlign !== BI.VerticalAlign.Middle) {
return items;
}
return BI.map(items, function (i, item) { return BI.map(items, function (i, item) {
if(!item || BI.isEmptyObject(item)){ if (!item || BI.isEmptyObject(item)) {
return item; return item;
} }
var el = BI.stripEL(item); var el = BI.stripEL(item);
if(BI.isWidget(el)){ if (BI.isWidget(el)) {
el.element.addClass("bi-abs-c-y-item"); el.element.addClass("bi-abs-c-y-item");
} else { } else {
el.cls = (el.cls || "") + "bi-abs-c-y-item"; el.cls = (el.cls || "") + "bi-abs-c-y-item";

7
src/core/wrapper/layout/float/float.absolute.vertical.js

@ -39,12 +39,15 @@ BI.FloatAbsoluteVerticalLayout = BI.inherit(BI.Layout, {
}, },
_formatItems: function (items) { _formatItems: function (items) {
if (this.options.verticalAlign !== BI.VerticalAlign.Middle) {
return items;
}
return BI.map(items, function (i, item) { return BI.map(items, function (i, item) {
if(!item || BI.isEmptyObject(item)){ if (!item || BI.isEmptyObject(item)) {
return item; return item;
} }
var el = BI.stripEL(item); var el = BI.stripEL(item);
if(BI.isWidget(el)){ if (BI.isWidget(el)) {
el.element.addClass("bi-abs-c-y-item"); el.element.addClass("bi-abs-c-y-item");
} else { } else {
el.cls = (el.cls || "") + "bi-abs-c-y-item"; el.cls = (el.cls || "") + "bi-abs-c-y-item";

Loading…
Cancel
Save