Browse Source

优化布局

es6
guy 4 years ago
parent
commit
0df7005385
  1. 2
      src/core/wrapper/layout/adapt/adapt.table.js
  2. 2
      src/core/wrapper/layout/layout.horizontal.js

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

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

2
src/core/wrapper/layout/layout.horizontal.js

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

Loading…
Cancel
Save