Browse Source

update

master
guy 3 years ago
parent
commit
2a70131ccd
  1. 10
      src/core/wrapper/layout/layout.inline.js

10
src/core/wrapper/layout/layout.inline.js

@ -36,8 +36,16 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item, length) {
var o = this.options;
var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
if (columnSize > 0) {
w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : (columnSize / BI.pixRatio + BI.pixUnit));
}
w.element.css({
width: o.columnSize[i] === "" ? "" : (o.columnSize[i] < 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)),
position: "relative",
"vertical-align": o.verticalAlign
});

Loading…
Cancel
Save