guy 3 years ago
parent
commit
4ec3168201
  1. 14
      src/core/wrapper/layout/adapt/adapt.table.js

14
src/core/wrapper/layout/adapt/adapt.table.js

@ -33,8 +33,18 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var td; var td, width = "";
var width = o.columnSize[i] === "" ? "" : (o.columnSize[i] < 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap + o.columnSize[i]); 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) {
width = columnSize < 1 ?
((columnSize * 100).toFixed(1) + "%")
: (columnSize + (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap);
}
if (!this.hasWidget(this._getChildName(i))) { if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item); var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});

Loading…
Cancel
Save