From f7b703a9433960da0b182fbbd1d1c1e0e1c3b6d3 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 12 May 2017 16:54:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/case.js | 18 +++++++++--------- bi/chart.js | 4 +++- docs/case.js | 18 +++++++++--------- docs/chart.js | 4 +++- src/addons/chart/chart.js | 4 +++- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/bi/case.js b/bi/case.js index 7b4c962e3c..163ac141da 100644 --- a/bi/case.js +++ b/bi/case.js @@ -9118,18 +9118,18 @@ BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, { var vDeep = this._getVDeep(); var header = this._createHeader(vDeep); var data = this._formatItems(o.items, header, deep); - // var columnSize = o.columnSize.slice(); - // var minColumnSize = o.minColumnSize.slice(); - // var maxColumnSize = o.maxColumnSize.slice(); - // BI.removeAt(columnSize, data.deletedCols); - // BI.removeAt(minColumnSize, data.deletedCols); - // BI.removeAt(maxColumnSize, data.deletedCols); + var columnSize = o.columnSize.slice(); + var minColumnSize = o.minColumnSize.slice(); + var maxColumnSize = o.maxColumnSize.slice(); + BI.removeAt(columnSize, data.deletedCols); + BI.removeAt(minColumnSize, data.deletedCols); + BI.removeAt(maxColumnSize, data.deletedCols); return { header: data.header, items: data.items, - columnSize: this._formatColumnSize(o.columnSize, deep), - minColumnSize: this._formatColumns(o.minColumnSize, deep), - maxColumnSize: this._formatColumns(o.maxColumnSize, deep), + columnSize: this._formatColumnSize(columnSize, deep), + minColumnSize: this._formatColumns(minColumnSize, deep), + maxColumnSize: this._formatColumns(maxColumnSize, deep), freezeCols: this._formatFreezeCols() } }, diff --git a/bi/chart.js b/bi/chart.js index 4130d7a7a0..b095fe2bbc 100644 --- a/bi/chart.js +++ b/bi/chart.js @@ -19,7 +19,9 @@ BI.Chart = BI.inherit(BI.Pane, { this.vanCharts = VanCharts.init(self.element[0]); this._resizer = BI.debounce(function () { - self.vanCharts.resize(); + if (self.element.width() > 0 && self.element.height() > 0) { + self.vanCharts.resize(); + } }, 30); BI.ResizeDetector.addResizeListener(this, function (e) { self._resizer(); diff --git a/docs/case.js b/docs/case.js index 7b4c962e3c..163ac141da 100644 --- a/docs/case.js +++ b/docs/case.js @@ -9118,18 +9118,18 @@ BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, { var vDeep = this._getVDeep(); var header = this._createHeader(vDeep); var data = this._formatItems(o.items, header, deep); - // var columnSize = o.columnSize.slice(); - // var minColumnSize = o.minColumnSize.slice(); - // var maxColumnSize = o.maxColumnSize.slice(); - // BI.removeAt(columnSize, data.deletedCols); - // BI.removeAt(minColumnSize, data.deletedCols); - // BI.removeAt(maxColumnSize, data.deletedCols); + var columnSize = o.columnSize.slice(); + var minColumnSize = o.minColumnSize.slice(); + var maxColumnSize = o.maxColumnSize.slice(); + BI.removeAt(columnSize, data.deletedCols); + BI.removeAt(minColumnSize, data.deletedCols); + BI.removeAt(maxColumnSize, data.deletedCols); return { header: data.header, items: data.items, - columnSize: this._formatColumnSize(o.columnSize, deep), - minColumnSize: this._formatColumns(o.minColumnSize, deep), - maxColumnSize: this._formatColumns(o.maxColumnSize, deep), + columnSize: this._formatColumnSize(columnSize, deep), + minColumnSize: this._formatColumns(minColumnSize, deep), + maxColumnSize: this._formatColumns(maxColumnSize, deep), freezeCols: this._formatFreezeCols() } }, diff --git a/docs/chart.js b/docs/chart.js index 4130d7a7a0..b095fe2bbc 100644 --- a/docs/chart.js +++ b/docs/chart.js @@ -19,7 +19,9 @@ BI.Chart = BI.inherit(BI.Pane, { this.vanCharts = VanCharts.init(self.element[0]); this._resizer = BI.debounce(function () { - self.vanCharts.resize(); + if (self.element.width() > 0 && self.element.height() > 0) { + self.vanCharts.resize(); + } }, 30); BI.ResizeDetector.addResizeListener(this, function (e) { self._resizer(); diff --git a/src/addons/chart/chart.js b/src/addons/chart/chart.js index 7cb4753394..cadcca0bc0 100644 --- a/src/addons/chart/chart.js +++ b/src/addons/chart/chart.js @@ -19,7 +19,9 @@ BI.Chart = BI.inherit(BI.Pane, { this.vanCharts = VanCharts.init(self.element[0]); this._resizer = BI.debounce(function () { - self.vanCharts.resize(); + if (self.element.width() > 0 && self.element.height() > 0) { + self.vanCharts.resize(); + } }, 30); BI.ResizeDetector.addResizeListener(this, function (e) { self._resizer();