Commit b56aff3c567675d5accb7d0482869de0f9b1fc92

Authored by ww
1 parent 72bbf660

chore: reset Format.js

Too many changes to show.

To preserve performance only 2 of 3 files are displayed.

... ... @@ -5030,6 +5030,9 @@ App.prototype.loadFile = function (id, sameWindow, file, success, force) {
5030 5030 lastModifiedDate: new Date()
5031 5031 };
5032 5032 this.openFileHandle(Editor.defaultContent, Editor.configurationName, file, false, fileHandle);
  5033 + // TODO thingsKit 初始化图表
  5034 + const graph = this.editor.graph
  5035 + Sidebar.prototype.initChartInstance(graph)
5033 5036 //加载数据结束
5034 5037
5035 5038 // if (id == null || id.length == 0)
... ...
... ... @@ -281,7 +281,8 @@
281 281 self.graph.setAttributeForCell(cell, enumConst.CHART_CELL_WIDTH, width)
282 282 self.graph.setAttributeForCell(cell, enumConst.CHART_CELL_HEIGHT, height)
283 283 const instance = chartsInstanceMapping.get(id)
284   - instance.resize()
  284 +
  285 + instance && instance.resize()
285 286 }
286 287 cellResized.apply(this, arguments)
287 288 }
... ... @@ -352,15 +353,17 @@
352 353 /**
353 354 * @description 初始化图表
354 355 */
355   - const openFileHandle = EditorUi.prototype.openFileHandle
356   - EditorUi.prototype.openFileHandle = function () {
357   - try {
358   - openFileHandle.apply(this, arguments)
359   - } finally {
360   - const graph = this.editor.graph
361   - Sidebar.prototype.initChartInstance(graph)
362   - }
363   - }
  356 + // const openFileHandle = EditorUi.prototype.openFileHandle
  357 + // EditorUi.prototype.openFileHandle = function () {
  358 + // console.log('enter open file')
  359 + // try {
  360 + // openFileHandle.apply(this, arguments)
  361 + // } finally {
  362 + // console.log('openFileHandle')
  363 + // const graph = this.editor.graph
  364 + // Sidebar.prototype.initChartInstance(graph)
  365 + // }
  366 + // }
364 367
365 368 /**
366 369 * @description 实例化 echarts
... ...