From 7e3613b1ba7f24e7ef7c87be654fcb5b955b2405 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 6 Jun 2021 02:41:20 +0800 Subject: [PATCH] bugfix --- .../flex/flex.leftrightvertical.center.js | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js b/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js index 497ea90528..e0a5bdd13a 100644 --- a/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js +++ b/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js @@ -54,28 +54,18 @@ BI.FlexLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, { } return json; }); - rightItems = BI.map(rightItems, function (i, item) { - var json = { - el: BI.stripEL(item) - }; - if (o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { - json.tgap = o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0); - } - if (o.rhgap + o.rlgap + (item.lgap || 0) + (item.hgap || 0) !== 0) { - json.lgap = o.rlgap + (item.lgap || 0) + (item.hgap || 0); - } - if (o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) { - json.rgap = o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0); - } - if (o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) { - json.bgap = o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0); - } - return json; - }); return leftItems.concat({ - type: "bi.flex_vertical_adapt", - cls: "flex-left-auto", - items: rightItems + el: { + type: "bi.flex_vertical_adapt", + cls: "flex-left-auto", + hgap: o.rhgap, + vgap: o.rvgap, + lgap: o.rlgap, + rgap: o.rrgap, + tgap: o.rtgap, + bgap: o.rbgap, + items: rightItems + } }); },