dcim-topology2d 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/chart-diagram/index.d.ts +2 -0
  2. package/chart-diagram/index.js +1 -0
  3. package/chart-diagram/src/echarts/index.d.ts +0 -1
  4. package/chart-diagram/src/echarts/index.js +106 -101
  5. package/chart-diagram/src/register.js +4 -3
  6. package/chart-diagram/src/utils/changeOptions.d.ts +4 -0
  7. package/chart-diagram/src/utils/changeOptions.js +163 -0
  8. package/chart-diagram/src/utils/conversion.d.ts +17 -0
  9. package/chart-diagram/src/utils/conversion.js +179 -0
  10. package/chart-diagram/src/utils/drawGraphic.d.ts +3 -0
  11. package/chart-diagram/src/utils/drawGraphic.js +97 -0
  12. package/chart-diagram/src/utils/index.d.ts +3 -0
  13. package/chart-diagram/src/utils/index.js +3 -0
  14. package/core/src/common.js +41 -35
  15. package/core/src/core.js +87 -58
  16. package/core/src/divLayer.d.ts +0 -26
  17. package/core/src/divLayer.js +22 -276
  18. package/core/src/healps/changeData.d.ts +1 -1
  19. package/core/src/healps/changeData.js +95 -57
  20. package/core/src/middles/arrows/index.d.ts +4 -0
  21. package/core/src/middles/arrows/index.js +5 -0
  22. package/core/src/middles/default.d.ts +1 -3
  23. package/core/src/middles/default.js +51 -51
  24. package/core/src/middles/index.js +3 -2
  25. package/core/src/middles/lines/index.d.ts +4 -0
  26. package/core/src/middles/lines/index.js +5 -0
  27. package/core/src/middles/nodes/iframe.d.ts +2 -0
  28. package/core/src/middles/nodes/iframe.js +12 -0
  29. package/core/src/middles/nodes/index.d.ts +46 -0
  30. package/core/src/middles/nodes/index.js +47 -0
  31. package/core/src/middles/nodes/pentagon.rect.js +1 -1
  32. package/core/src/middles/nodes/rectangle.rect.js +1 -1
  33. package/core/src/models/node.d.ts +6 -0
  34. package/core/src/models/node.js +17 -7
  35. package/core/src/models/pen.js +10 -1
  36. package/core/src/preview.js +30 -7
  37. package/core/src/renderLayer.js +1 -1
  38. package/core/src/store/data.js +2 -0
  39. package/core/src/utils/canvas.js +1 -1
  40. package/core/src/utils/dom.d.ts +2 -0
  41. package/core/src/utils/dom.js +66 -32
  42. package/core/src/utils/onmousevent.js +12 -3
  43. package/package.json +1 -1
  44. package/static/echartsDefaultData.js +239 -0
  45. package/static/echartsStore.js +14 -0
  46. package/static/index.js +2 -0
  47. package/style/index.css +13 -0
@@ -0,0 +1,97 @@
1
+ // 绘制柱子切面
2
+ export function drawGraphicShape(appearance) {
3
+ const offsetX = appearance.offsetX;
4
+ const offsetY = appearance.offsetY;
5
+ // 绘制左侧面
6
+ const CubeLeft = echarts.graphic.extendShape({
7
+ shape: {
8
+ x: 0,
9
+ y: 0,
10
+ },
11
+ buildPath: function (ctx, shape) {
12
+ // 会canvas的应该都能看得懂,shape是从custom传入的
13
+ const xAxisPoint = shape.xAxisPoint;
14
+ // console.log(shape);
15
+ const c0 = [shape.x, shape.y];
16
+ const c1 = [shape.x - offsetX, shape.y - offsetY];
17
+ const c2 = [xAxisPoint[0] - offsetX, xAxisPoint[1] - offsetY];
18
+ const c3 = [xAxisPoint[0], xAxisPoint[1]];
19
+ ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
20
+ },
21
+ });
22
+ // 绘制右侧面
23
+ const CubeRight = echarts.graphic.extendShape({
24
+ shape: {
25
+ x: 0,
26
+ y: 0,
27
+ },
28
+ buildPath: function (ctx, shape) {
29
+ const xAxisPoint = shape.xAxisPoint;
30
+ const c1 = [shape.x, shape.y];
31
+ const c2 = [xAxisPoint[0], xAxisPoint[1]];
32
+ const c3 = [xAxisPoint[0] + offsetX, xAxisPoint[1] - offsetY];
33
+ const c4 = [shape.x + offsetX, shape.y - offsetY];
34
+ ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
35
+ },
36
+ });
37
+ // 绘制顶面
38
+ const CubeTop = echarts.graphic.extendShape({
39
+ shape: {
40
+ x: 0,
41
+ y: 0,
42
+ },
43
+ buildPath: function (ctx, shape) {
44
+ const c1 = [shape.x, shape.y];
45
+ const c2 = [shape.x + offsetX, shape.y - offsetY]; //右点
46
+ const c3 = [shape.x, shape.y - offsetX];
47
+ const c4 = [shape.x - offsetX, shape.y - offsetY];
48
+ ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
49
+ },
50
+ });
51
+ return {
52
+ CubeLeft,
53
+ CubeRight,
54
+ CubeTop
55
+ }
56
+ }
57
+ // 线性渐变
58
+ export function graphicLinearGradient(nr, nb, nl, nt, colors) {
59
+ return new echarts.graphic.LinearGradient(nr, nb, nl, nt, colors);
60
+ }
61
+ export function setSeriesRenderGroup(appearance, api) {
62
+ const seriesRenderData = [];
63
+ const groupTypeData = ['CubeLeft', 'CubeRight', 'CubeTop'];
64
+ const location = api.coord([api.value(0), api.value(1)]);
65
+ for (let i = 0; i < groupTypeData.length; i++) {
66
+ const groupItem = groupTypeData[i];
67
+ const groupNode = {
68
+ type: groupItem,
69
+ shape: {
70
+ api,
71
+ xValue: api.value(0),
72
+ yValue: api.value(1),
73
+ x: location[0],
74
+ y: location[1],
75
+ xAxisPoint: api.coord([api.value(0), 0]),
76
+ }
77
+ };
78
+ if(i === groupTypeData.length - 1){
79
+ // 顶部切面颜色填充
80
+ groupNode.style = {
81
+ fill: appearance.seriesCubeTopColor
82
+ }
83
+ }else {
84
+ // 左右切面颜色填充
85
+ let fillColor = graphicLinearGradient(0, 0, 0, 1, appearance[`series${groupItem}Gradient`]);
86
+ const cubeColorLinear = appearance[`series${groupItem}Linear`];
87
+ if(!cubeColorLinear) {
88
+ fillColor = appearance[`series${groupItem}Color`];
89
+ }
90
+ groupNode.style = {
91
+ fill: fillColor
92
+ }
93
+ }
94
+ seriesRenderData.push(groupNode);
95
+ }
96
+ return seriesRenderData;
97
+ }
@@ -0,0 +1,3 @@
1
+ export * from './conversion';
2
+ export * from './drawGraphic';
3
+ export * from './changeOptions';
@@ -0,0 +1,3 @@
1
+ export * from './conversion';
2
+ export * from './drawGraphic';
3
+ export * from './changeOptions';
@@ -4,12 +4,13 @@ import {AnimateLayer} from './animateLayer';
4
4
  import {RenderLayer} from './renderLayer';
5
5
  import {Offscreen} from './offscreen';
6
6
  import {Line, Node, Point, EventAction} from './models';
7
- import {setConfItemNode} from './healps';
7
+ import {setConfItemNode, setStatisticalData} from './healps';
8
8
  import {s8, formatPadding, getRect} from './utils';
9
9
  import { useStore, clearStore } from './store'
10
10
  import {POLL} from './poll';
11
11
  import axios from 'axios';
12
12
  import * as mqtt from './mqtt.min';
13
+ import { destroyEcharts } from "../../static";
13
14
 
14
15
  var MoveInType;
15
16
  (function (MoveInType) {
@@ -51,10 +52,10 @@ var Common = /** @class */ (function () {
51
52
  this.store.options.interval = 50;
52
53
  //Store.set(this.generateStoreKey('topology-data'), this.data);
53
54
  var id = this.id;
54
- this.animateLayer = new AnimateLayer(id);
55
- this.offscreen = new Offscreen(id);
55
+ this.animateLayer = new AnimateLayer(id);
56
+ this.offscreen = new Offscreen(id);
56
57
  this.canvas = new RenderLayer(id);
57
- this.divLayer = new DivLayer(id);
58
+ this.divLayer = new DivLayer(id);
58
59
  this.divLayer.canvas.tabIndex = 0;
59
60
  this.divLayer.canvas.ondblclick = this.ondblclick;
60
61
  this.divLayer.canvas.onblur = function () {
@@ -176,7 +177,7 @@ var Common = /** @class */ (function () {
176
177
  window.topology = this;
177
178
  }
178
179
 
179
- Common.prototype.conversionData = function (obj) {
180
+ Common.prototype.conversionData = function (obj, type) {
180
181
  this.clear();
181
182
  let data = JSON.parse(JSON.stringify(obj));
182
183
  if (!data) {
@@ -184,18 +185,23 @@ var Common = /** @class */ (function () {
184
185
  }
185
186
  Object.assign(this.store.data, data);
186
187
  this.store.data.pens = [];
187
- this.setBKImageRect();
188
188
  this.openCount = 0
189
189
  // for old data.
190
190
  if (data.nodes) {
191
191
  for (var _i = 0, _a = data.nodes; _i < _a.length; _i++) {
192
- var item = new Node(_a[_i]);
192
+ _a[_i].TID = this.id;
193
+ const item = new Node(_a[_i]);
193
194
  this.store.data.pens.push(item);
194
195
  this.store.pens[item.id] = item;
195
196
  this.setSwitchTabData(item, _i);
197
+ // 初始化图表数据
198
+ if (item.name === 'echarts' && item.data && type !== 'mqtt') {
199
+ item.data.echarts.option = setStatisticalData(item, 'def');
200
+ }
196
201
  }
197
202
  for (var _b = 0, _c = data.lines; _b < _c.length; _b++) {
198
- var item = new Line(_c[_b]);
203
+ _c[_b].TID = this.id;
204
+ const item = new Line(_c[_b]);
199
205
  this.store.data.pens.push(item);
200
206
  this.store.pens[item.id] = item;
201
207
  }
@@ -203,12 +209,17 @@ var Common = /** @class */ (function () {
203
209
  // end.
204
210
  if (data.pens) {
205
211
  for (var _d = 0, _e = data.pens; _d < _e.length; _d++) {
206
- var item = _e[_d];
212
+ const item = _e[_d];
213
+ item.TID = this.id;
207
214
  if (!item.from) {
208
- var node = new Node(item);
215
+ const node = new Node(item);
209
216
  this.store.data.pens.push(node);
210
217
  this.store.pens[item.id] = node;
211
218
  this.setSwitchTabData(node, _d);
219
+ // 初始化图表数据
220
+ if (node.name === 'echarts' && node.data && type !== 'mqtt') {
221
+ node.data.echarts.option = setStatisticalData(node, 'def');
222
+ }
212
223
  } else {
213
224
  const linNode = new Line(item);
214
225
  this.store.data.pens.push(linNode);
@@ -224,18 +235,6 @@ var Common = /** @class */ (function () {
224
235
  this.store.parentElem.scrollLeft = 0;
225
236
  this.store.parentElem.scrollTop = 0;
226
237
  };
227
- Common.prototype.setBKImageRect = function () {
228
- if (this.store.data.bkImageRect) {
229
- this.store.data.bkImageRect.x = this.store.data.bkImageRect.x ? Number(this.store.data.bkImageRect.x) : 0;
230
- this.store.data.bkImageRect.y = this.store.data.bkImageRect.y ? Number(this.store.data.bkImageRect.y) : 0;
231
- this.store.data.bkImageRect.width = this.store.data.bkImageRect.width ? Number(this.store.data.bkImageRect.width) : this.canvas.width;
232
- this.store.data.bkImageRect.height = this.store.data.bkImageRect.height ? Number(this.store.data.bkImageRect.height) : this.canvas.height;
233
- this.store.data.bkImageRect.center = {
234
- x: this.store.data.bkImageRect.x + this.store.data.bkImageRect.width / 2,
235
- y: this.store.data.bkImageRect.y + this.store.data.bkImageRect.height / 2
236
- }
237
- }
238
- };
239
238
  Common.prototype.setSwitchTabData = function (node, index, type) {
240
239
  if (type) {
241
240
  let topologyChangeData = Store.get('TCD:topologyChangeData');
@@ -269,12 +268,12 @@ var Common = /** @class */ (function () {
269
268
  };
270
269
  Common.prototype.canvasResize = function (size) {
271
270
  try {
272
- this.canvas.resize(size);
273
- //this.canvas.bkImgRectResize(size);
274
- this.offscreen.resize(size);
275
- this.divLayer.resize(size);
271
+ this.canvas.resize(size);
272
+ //this.canvas.bkImgRectResize(size);
273
+ this.offscreen.resize(size);
274
+ this.divLayer.resize(size);
276
275
  }catch (err) {
277
- //console.log('resize-----', err)
276
+ //console.log('resize-----', err)
278
277
  }
279
278
  };
280
279
  // Render or redraw
@@ -878,7 +877,7 @@ var Common = /** @class */ (function () {
878
877
  let path = '';
879
878
  let assetData = null;
880
879
  let pathRewrite = this.pathRewrite;
881
- let canvasData = JSON.parse(JSON.stringify(this.store.data));
880
+ let canvasData = this.store.data;
882
881
  let mqttTopics = this.store.data.mqttTopics;
883
882
  let tagParamsData = tagParams;
884
883
  let detailJson = null;
@@ -954,6 +953,7 @@ var Common = /** @class */ (function () {
954
953
  // console.log('收到消息', syncData)
955
954
  Store.set('mqtt:responseData', syncData);
956
955
  data.pens.map((item) => {
956
+ item.TID = this.id;
957
957
  if (item.children && item.children.length) {
958
958
  item.children.map((_item) => {
959
959
  item.defaultFillStyle = item.fillStyle;
@@ -982,9 +982,12 @@ var Common = /** @class */ (function () {
982
982
  }
983
983
  })
984
984
  //console.log('定制函数=====')
985
- console.log('定制函数------')
986
- const func = new Function('pen', 'params', dataValue.value)
987
- func(_item, JSON.stringify(retData))
985
+ try {
986
+ const func = new Function('pen', 'params', dataValue.value)
987
+ func(_item, JSON.stringify(retData))
988
+ }catch (e) {
989
+ console.log(`自定义函数 ${item.id} 出错>>>`, e);
990
+ }
988
991
  } else {
989
992
  // console.log('默认函数')
990
993
  setConfItemNode(_item, syncData);
@@ -1017,10 +1020,12 @@ var Common = /** @class */ (function () {
1017
1020
  }
1018
1021
  }
1019
1022
  });
1020
- const func = new Function('pen', 'params', dataValue.value);
1021
- func(item, JSON.stringify(retData));
1022
- //const machData = func(item, JSON.stringify(retData));
1023
- console.log('定制函数------------');
1023
+ try {
1024
+ const func = new Function('pen', 'params', dataValue.value);
1025
+ func(item, JSON.stringify(retData));
1026
+ }catch (e) {
1027
+ console.log(`自定义函数 ${item.id} 出错>>>`, e);
1028
+ }
1024
1029
  } else {
1025
1030
  // console.log('默认函数')
1026
1031
  setConfItemNode(item, syncData);
@@ -1255,6 +1260,7 @@ var Common = /** @class */ (function () {
1255
1260
  this.offscreen.destroy();
1256
1261
  this.offscreen = null;
1257
1262
  this.store.parentElem = null;
1263
+ destroyEcharts();
1258
1264
  Store.set('form:tableData', null);
1259
1265
  Store.set('TIMEOUT:currentPage', `empty${this.s8()}`);
1260
1266
  Store.set('FORM:tableData', {
package/core/src/core.js CHANGED
@@ -47,6 +47,7 @@ var Topology = (function (_super) {
47
47
  close: false, //闭合
48
48
  };
49
49
  _this.onMouseMove = function (e) {
50
+ _this.store.data.dataResize = 0;
50
51
  if (Store.get('addingArbitraryGraph')) {
51
52
  return
52
53
  }
@@ -339,6 +340,7 @@ var Topology = (function (_super) {
339
340
  });
340
341
  };
341
342
  _this.onmousedown = function (e) {
343
+ _this.store.data.dataResize = 0;
342
344
  if (e.button !== 0)
343
345
  return;
344
346
  var canvasPos = _this.divLayer.canvas.getBoundingClientRect();
@@ -691,20 +693,7 @@ var Topology = (function (_super) {
691
693
  isDragging: false, //是否在抓取
692
694
  close: false, //闭合
693
695
  };
694
- if (obj.name == 'temp') {
695
- // 温湿度元件
696
- let activeTempNodes = []
697
- _this.dropNodes([obj.children[0]], event.offsetX - 23.5, event.offsetY)
698
- activeTempNodes.push(_this.activeLayer.pens[0])
699
- _this.dropNodes([obj.children[1]], event.offsetX + 11.5, event.offsetY - 8.5)
700
- activeTempNodes.push(_this.activeLayer.pens[0])
701
- _this.dropNodes([obj.children[2]], event.offsetX + 11.5, event.offsetY + 8.5)
702
- activeTempNodes.push(_this.activeLayer.pens[0])
703
- _this.activeLayer.pens = activeTempNodes
704
- _this.combine(activeTempNodes, null, 'temp');
705
- } else {
706
- _this.dropNodes(Array.isArray(obj) ? obj : [obj], event.offsetX, event.offsetY);
707
- }
696
+ _this.dropNodes(Array.isArray(obj) ? obj : [obj], event.offsetX, event.offsetY);
708
697
  } catch (_a) {
709
698
  }
710
699
  };
@@ -863,48 +852,16 @@ var Topology = (function (_super) {
863
852
  }
864
853
 
865
854
  if (json.name == 'define') {
866
-
867
855
  // console.log('创建自定义组件 ', json);
868
-
869
856
  console.log('store 中的 自定义 ', Store.get('defineNode'));
870
- if (_this.store.data.locked) return
871
- // let defineNode = Store.get('defineNode');
872
- // let nodesList = Store.get('defineNode').pens;
873
- let defineNode = JSON.parse(localStorage.getItem("defineNode_"))
874
- let nodesList = defineNode.pens;
875
-
876
- let renderNodesList = [];
877
-
878
- for (let i = 0, len = nodesList.length; i < len; i++) {
879
-
880
- nodesList[i].rect.x = offsetX - nodesList[i].rect.width / 2;
881
-
882
- nodesList[i].rect.y = offsetY - nodesList[i].rect.height / 2;
883
-
884
- let node = new Node(nodesList[i]);
885
-
886
- node.setTID(s8());
887
- node.id = s8();
888
- node.fileId = defineNode.fileId;
889
-
890
- // console.log('push之前的node', node);
891
-
892
- _this.store.data.pens.push(node);
893
-
894
- renderNodesList.push(node);
895
- }
896
- _this.activeLayer.setPens([renderNodesList[0]]);
897
-
898
- _this.render(false);
899
-
900
- _this.animate(true);
901
-
902
- _this.cache();
903
-
904
- _this.dispatch('addNode', renderNodesList[0]);
905
-
906
- } else {
857
+ _this.dropDefineNode(json, offsetX, offsetY);
858
+ } else if(json.name === 'temp') {
859
+ // 温湿度元件
860
+ _this.dropTempNode(json);
861
+ }else {
907
862
  var node = new Node(json);
863
+ if(node.name === 'echarts') node.dash = 4;
864
+ if(node.name === 'iframe') node.iframe = 'http://www.yingzeshiji.com.cn/'; // 默认展示盈泽世纪官网
908
865
  node.setTID(_this.id);
909
866
  node.clearChildrenIds();
910
867
  _this.addNode(node, true);
@@ -921,7 +878,76 @@ var Topology = (function (_super) {
921
878
  });
922
879
  this.divLayer.canvas.focus();
923
880
  };
924
- Topology.prototype.addNode = function (node, focus) {
881
+ Topology.prototype.setNodeData = function(node) {
882
+ const item = new Node(node);
883
+ item.setTID(this.id);
884
+ item.clearChildrenIds();
885
+ return item;
886
+ };
887
+ // 添加温湿度元件
888
+ Topology.prototype.dropTempNode = function(json) {
889
+ const nodeChildren = json.children;
890
+ delete json['children'];
891
+ const node = this.setNodeData(json);
892
+ const combinTempData = [];
893
+ let nodeX = node.rect.x;
894
+ let nodeY = node.rect.y;
895
+ for (let i = 0; i < nodeChildren.length; i++) {
896
+ const childNode = this.setNodeData(nodeChildren[i]);
897
+ childNode.rect.x = i === 0 ? nodeX : nodeX + childNode.rect.width / 2;
898
+ childNode.rect.y = i === 2 ? nodeY + childNode.rect.height + 1 : nodeY;
899
+ childNode.rect.center = {
900
+ x: childNode.rect.x + childNode.rect.width / 2,
901
+ y: childNode.rect.y + childNode.rect.height / 2
902
+ }
903
+ childNode.rect.ex = childNode.rect.x + childNode.rect.width;
904
+ childNode.rect.ey = childNode.rect.y + childNode.rect.height;
905
+ combinTempData.push(childNode);
906
+ }
907
+ this.combine(combinTempData, null, 'temp');
908
+ this.render();
909
+ this.cache();
910
+ };
911
+ // 添加自定义元件
912
+ Topology.prototype.dropDefineNode = function(josn, offsetX, offsetY) {
913
+ var _this = this;
914
+ if (_this.store.data.locked) return
915
+ // let defineNode = Store.get('defineNode');
916
+ // let nodesList = Store.get('defineNode').pens;
917
+ let defineNode = JSON.parse(localStorage.getItem("defineNode_"))
918
+ let nodesList = defineNode.pens;
919
+
920
+ let renderNodesList = [];
921
+
922
+ for (let i = 0, len = nodesList.length; i < len; i++) {
923
+
924
+ nodesList[i].rect.x = offsetX - nodesList[i].rect.width / 2;
925
+
926
+ nodesList[i].rect.y = offsetY - nodesList[i].rect.height / 2;
927
+
928
+ let node = new Node(nodesList[i]);
929
+
930
+ node.setTID(s8());
931
+ node.id = s8();
932
+ node.fileId = defineNode.fileId;
933
+
934
+ // console.log('push之前的node', node);
935
+
936
+ _this.store.data.pens.push(node);
937
+
938
+ renderNodesList.push(node);
939
+ }
940
+ _this.activeLayer.setPens([renderNodesList[0]]);
941
+
942
+ _this.render(false);
943
+
944
+ _this.animate(true);
945
+
946
+ _this.cache();
947
+
948
+ _this.dispatch('addNode', renderNodesList[0]);
949
+ };
950
+ Topology.prototype.addNode = function (node, focus, visit) {
925
951
  if (focus === void 0) {
926
952
  focus = false;
927
953
  }
@@ -946,11 +972,13 @@ var Topology = (function (_super) {
946
972
  this.store.data.pens.push(node);
947
973
  this.setSwitchTabData(node, this.store.data.pens.length-1);
948
974
  if (focus) {
949
- this.activeLayer.setPens([node]);
950
975
  this.render();
951
976
  this.animate(true);
952
977
  this.cache();
953
- this.dispatch('addNode', node);
978
+ if(!visit) {
979
+ this.activeLayer.setPens([node]);
980
+ this.dispatch('addNode', node);
981
+ }
954
982
  }
955
983
  return node;
956
984
  };
@@ -1002,7 +1030,7 @@ var Topology = (function (_super) {
1002
1030
  if (height < rect.height) {
1003
1031
  height = rect.height;
1004
1032
  }
1005
- this.resize({width: width + 20, height: height + 20});
1033
+ this.resize({width: width, height: height});
1006
1034
  return rect;
1007
1035
  }catch (e){
1008
1036
  //console.log('init-error-----------',e)
@@ -1068,6 +1096,7 @@ var Topology = (function (_super) {
1068
1096
  }
1069
1097
  }
1070
1098
  }
1099
+ this.store.data.dataResize = 1;
1071
1100
  this.divLayer.canvas.style.cursor = 'default';
1072
1101
  var len = this.store.data.pens.length;
1073
1102
  for (var i = len - 1; i > -1; --i) {
@@ -1837,7 +1866,7 @@ var Topology = (function (_super) {
1837
1866
  this.store.data.pens.splice(i + 1, 1);
1838
1867
  }
1839
1868
  };
1840
- Topology.prototype.combine = function (pens, stand, temp) {
1869
+ Topology.prototype.combine = function (pens, stand, temp, rect) {
1841
1870
  if (stand === void 0) {
1842
1871
  stand = false;
1843
1872
  }
@@ -2,28 +2,6 @@ import { Node } from './models';
2
2
  import { Layer } from './layer';
3
3
  export declare class DivLayer extends Layer {
4
4
  canvas: HTMLDivElement;
5
- player: HTMLDivElement;
6
- curNode: Node;
7
- playBtn: HTMLElement;
8
- currentTime: HTMLElement;
9
- progressCurrent: HTMLElement;
10
- progress: HTMLElement;
11
- loop: HTMLElement;
12
- media: HTMLMediaElement;
13
- videos: {
14
- [key: string]: {
15
- player: HTMLElement;
16
- current: HTMLElement;
17
- media: HTMLMediaElement;
18
- };
19
- };
20
- audios: {
21
- [key: string]: {
22
- player: HTMLElement;
23
- current: HTMLElement;
24
- media: HTMLMediaElement;
25
- };
26
- };
27
5
  iframes: {
28
6
  [key: string]: HTMLIFrameElement;
29
7
  };
@@ -37,10 +15,6 @@ export declare class DivLayer extends Layer {
37
15
  private subcribeNode;
38
16
  constructor(TID: String);
39
17
  addDiv: (node: Node) => void;
40
- createPlayer(): void;
41
- getMediaCurrent(): void;
42
- addMedia(node: Node, type: string): HTMLDivElement;
43
- playNext(next: string): void;
44
18
  addIframe(node: Node): HTMLIFrameElement;
45
19
  addGif(node: Node): HTMLImageElement;
46
20
  setElemPosition(node: Node, elem: HTMLElement): void;