dcim-topology2d 2.2.3 → 3.0.2

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 (222) hide show
  1. package/activity-diagram/src/final/final.d.ts +1 -1
  2. package/activity-diagram/src/final/final.rect.d.ts +1 -1
  3. package/activity-diagram/src/final/final.rect.js +1 -1
  4. package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
  5. package/activity-diagram/src/fork/fork.anchor.js +1 -1
  6. package/activity-diagram/src/fork/fork.d.ts +1 -1
  7. package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
  8. package/activity-diagram/src/fork/fork.rect.js +1 -1
  9. package/activity-diagram/src/register.js +1 -1
  10. package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
  11. package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
  12. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
  13. package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
  14. package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
  15. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
  16. package/chart-diagram/index.d.ts +1 -3
  17. package/chart-diagram/index.js +1 -2
  18. package/chart-diagram/src/echarts/index.d.ts +2 -1
  19. package/chart-diagram/src/echarts/index.js +78 -86
  20. package/chart-diagram/src/register.js +8 -9
  21. package/class-diagram/src/class/class.d.ts +1 -1
  22. package/class-diagram/src/class/class.rect.d.ts +1 -1
  23. package/class-diagram/src/class/class.rect.js +1 -1
  24. package/class-diagram/src/register.js +1 -1
  25. package/core/index.d.ts +0 -2
  26. package/core/index.js +18 -2
  27. package/core/src/activeLayer.d.ts +10 -2
  28. package/core/src/activeLayer.js +62 -57
  29. package/core/src/animateLayer.d.ts +7 -3
  30. package/core/src/animateLayer.js +12 -10
  31. package/core/src/calling.d.ts +4 -1
  32. package/core/src/calling.js +68 -69
  33. package/core/src/canvas.d.ts +6 -1
  34. package/core/src/canvas.js +21 -22
  35. package/core/src/common.d.ts +7 -7
  36. package/core/src/common.js +698 -397
  37. package/core/src/core.d.ts +4 -5
  38. package/core/src/core.js +385 -536
  39. package/core/src/divLayer.d.ts +36 -2
  40. package/core/src/divLayer.js +305 -33
  41. package/core/src/healps/changeData.d.ts +2 -1
  42. package/core/src/healps/changeData.js +100 -89
  43. package/core/src/hoverLayer.d.ts +9 -2
  44. package/core/src/hoverLayer.js +34 -31
  45. package/core/src/middles/default.d.ts +3 -1
  46. package/core/src/middles/default.js +51 -65
  47. package/core/src/middles/index.d.ts +2 -1
  48. package/core/src/middles/index.js +2 -4
  49. package/core/src/middles/nodes/arbitrarygraph.js +9 -11
  50. package/core/src/middles/nodes/pentagon.rect.js +1 -1
  51. package/core/src/middles/nodes/rectangle.js +15 -54
  52. package/core/src/middles/nodes/rectangle.rect.js +1 -1
  53. package/core/src/models/data.d.ts +26 -0
  54. package/core/src/models/data.js +77 -0
  55. package/core/src/models/data.js.map +1 -0
  56. package/core/src/models/index.d.ts +1 -0
  57. package/core/src/models/index.js +1 -0
  58. package/core/src/models/line.js +7 -7
  59. package/core/src/models/node.d.ts +0 -10
  60. package/core/src/models/node.js +101 -155
  61. package/core/src/models/pen.js +68 -37
  62. package/core/src/models/rect.js +2 -2
  63. package/core/src/mqtt.d.ts +14 -0
  64. package/core/src/mqtt.js +82 -0
  65. package/core/src/mqtt.js.map +1 -0
  66. package/core/src/offscreen.d.ts +4 -1
  67. package/core/src/offscreen.js +24 -26
  68. package/core/src/options.d.ts +1 -3
  69. package/core/src/options.js +0 -2
  70. package/core/src/poll.js +39 -0
  71. package/core/src/preview.d.ts +13 -2
  72. package/core/src/preview.js +54 -181
  73. package/core/src/renderLayer.d.ts +9 -11
  74. package/core/src/renderLayer.js +61 -60
  75. package/core/src/socket.d.ts +10 -0
  76. package/core/src/socket.js +51 -0
  77. package/core/src/socket.js.map +1 -0
  78. package/core/src/utils/canvas.js +1 -1
  79. package/core/src/utils/construction.d.ts +3 -36
  80. package/core/src/utils/construction.js +1 -29
  81. package/core/src/utils/conversion.d.ts +0 -15
  82. package/core/src/utils/conversion.js +0 -319
  83. package/core/src/utils/dom.d.ts +8 -0
  84. package/core/src/utils/dom.js +67 -0
  85. package/core/src/utils/dom.js.map +1 -0
  86. package/core/src/utils/index.d.ts +1 -2
  87. package/core/src/utils/index.js +1 -2
  88. package/core/src/utils/onmousevent.d.ts +0 -3
  89. package/core/src/utils/onmousevent.js +10 -42
  90. package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
  91. package/flow-diagram/src/comment/comment.anchor.js +1 -1
  92. package/flow-diagram/src/comment/comment.d.ts +1 -1
  93. package/flow-diagram/src/data/data.anchor.d.ts +1 -1
  94. package/flow-diagram/src/data/data.anchor.js +1 -1
  95. package/flow-diagram/src/data/data.d.ts +1 -1
  96. package/flow-diagram/src/data/data.rect.d.ts +1 -1
  97. package/flow-diagram/src/data/data.rect.js +1 -1
  98. package/flow-diagram/src/db/db.d.ts +1 -1
  99. package/flow-diagram/src/db/db.rect.d.ts +1 -1
  100. package/flow-diagram/src/db/db.rect.js +1 -1
  101. package/flow-diagram/src/display/display.anchor.d.ts +1 -1
  102. package/flow-diagram/src/display/display.anchor.js +1 -1
  103. package/flow-diagram/src/display/display.d.ts +1 -1
  104. package/flow-diagram/src/display/display.rect.d.ts +1 -1
  105. package/flow-diagram/src/display/display.rect.js +1 -1
  106. package/flow-diagram/src/document/document.anchor.d.ts +1 -1
  107. package/flow-diagram/src/document/document.anchor.js +1 -1
  108. package/flow-diagram/src/document/document.d.ts +1 -1
  109. package/flow-diagram/src/document/document.rect.d.ts +1 -1
  110. package/flow-diagram/src/document/document.rect.js +1 -1
  111. package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
  112. package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
  113. package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
  114. package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
  115. package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
  116. package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
  117. package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
  118. package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
  119. package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
  120. package/flow-diagram/src/manually/manually.anchor.js +1 -1
  121. package/flow-diagram/src/manually/manually.d.ts +1 -1
  122. package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
  123. package/flow-diagram/src/manually/manually.rect.js +1 -1
  124. package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
  125. package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
  126. package/flow-diagram/src/parallel/parallel.d.ts +1 -1
  127. package/flow-diagram/src/queue/queue.d.ts +1 -1
  128. package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
  129. package/flow-diagram/src/queue/queue.rect.js +1 -1
  130. package/flow-diagram/src/register.js +1 -1
  131. package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
  132. package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
  133. package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
  134. package/layout/src/align.d.ts +1 -1
  135. package/layout/src/align.js +1 -1
  136. package/layout/src/layout.d.ts +1 -1
  137. package/layout/src/layout.js +1 -1
  138. package/myShape-diagram/{index.js → myShape.js} +1 -4
  139. package/package.json +1 -1
  140. package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
  141. package/sequence-diagram/src/focus/focus.anchor.js +1 -1
  142. package/sequence-diagram/src/focus/focus.d.ts +1 -1
  143. package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
  144. package/sequence-diagram/src/focus/focus.rect.js +1 -1
  145. package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
  146. package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
  147. package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
  148. package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
  149. package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
  150. package/sequence-diagram/src/register.js +1 -1
  151. package/chart-diagram/src/utils/changeOptions.d.ts +0 -8
  152. package/chart-diagram/src/utils/changeOptions.js +0 -273
  153. package/chart-diagram/src/utils/conversion.d.ts +0 -19
  154. package/chart-diagram/src/utils/conversion.js +0 -601
  155. package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
  156. package/chart-diagram/src/utils/drawGraphic.js +0 -97
  157. package/chart-diagram/src/utils/formatter.d.ts +0 -1
  158. package/chart-diagram/src/utils/formatter.js +0 -206
  159. package/chart-diagram/src/utils/index.d.ts +0 -5
  160. package/chart-diagram/src/utils/index.js +0 -5
  161. package/chart-diagram/src/utils/render.d.ts +0 -8
  162. package/chart-diagram/src/utils/render.js +0 -223
  163. package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
  164. package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
  165. package/core/src/element/common.d.ts +0 -6
  166. package/core/src/element/common.js +0 -62
  167. package/core/src/element/datePicker.d.ts +0 -3
  168. package/core/src/element/datePicker.js +0 -44
  169. package/core/src/element/iframe.d.ts +0 -3
  170. package/core/src/element/iframe.js +0 -12
  171. package/core/src/element/index.d.ts +0 -5
  172. package/core/src/element/index.js +0 -6
  173. package/core/src/element/select.d.ts +0 -11
  174. package/core/src/element/select.js +0 -273
  175. package/core/src/element/tab.d.ts +0 -1
  176. package/core/src/element/tab.js +0 -20
  177. package/core/src/element/time.d.ts +0 -3
  178. package/core/src/element/time.js +0 -44
  179. package/core/src/middles/arrows/index.d.ts +0 -4
  180. package/core/src/middles/arrows/index.js +0 -5
  181. package/core/src/middles/lines/index.d.ts +0 -4
  182. package/core/src/middles/lines/index.js +0 -5
  183. package/core/src/middles/nodes/formDatePicker.d.ts +0 -2
  184. package/core/src/middles/nodes/formDatePicker.js +0 -108
  185. package/core/src/middles/nodes/formoverflow.js +0 -62
  186. package/core/src/middles/nodes/formselect.d.ts +0 -2
  187. package/core/src/middles/nodes/formselect.js +0 -111
  188. package/core/src/middles/nodes/iframe.d.ts +0 -2
  189. package/core/src/middles/nodes/iframe.js +0 -29
  190. package/core/src/middles/nodes/index.d.ts +0 -52
  191. package/core/src/middles/nodes/index.js +0 -54
  192. package/core/src/middles/nodes/progress.d.ts +0 -2
  193. package/core/src/middles/nodes/progress.js +0 -63
  194. package/core/src/middles/nodes/progress.js.map +0 -1
  195. package/core/src/middles/nodes/switchs.d.ts +0 -2
  196. package/core/src/middles/nodes/switchs.js +0 -46
  197. package/core/src/middles/nodes/time.d.ts +0 -2
  198. package/core/src/middles/nodes/time.js +0 -98
  199. package/core/src/store/common.d.ts +0 -9
  200. package/core/src/store/common.js +0 -5
  201. package/core/src/store/data.d.ts +0 -205
  202. package/core/src/store/data.js +0 -198
  203. package/core/src/store/index.d.ts +0 -2
  204. package/core/src/store/index.js +0 -2
  205. package/core/src/utils/assignment.d.ts +0 -7
  206. package/core/src/utils/assignment.js +0 -229
  207. package/core/src/utils/params.d.ts +0 -3
  208. package/core/src/utils/params.js +0 -136
  209. package/static/echartsDefaultData.js +0 -178
  210. package/static/element.js +0 -14
  211. package/static/form.js +0 -11
  212. package/static/index.js +0 -3
  213. package/store/actions.js +0 -2
  214. package/store/clear.js +0 -14
  215. package/store/default.js +0 -22
  216. package/store/index.js +0 -3
  217. package/style/common.css +0 -15
  218. package/style/datePicker.css +0 -44
  219. package/style/editor.css +0 -16
  220. package/style/index.css +0 -5
  221. package/style/select.css +0 -143
  222. /package/myShape-diagram/{index.d.ts → myShape.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { Rect } from '../../models';
1
+ import { Rect } from '../../models/rect';
2
2
  export function pentagonIconRect(node) {
3
3
  var w = node.rect.width / 2;
4
4
  var h = node.rect.height / 2;
@@ -1,62 +1,23 @@
1
1
  export function rectangle(ctx, node) {
2
-
3
- var topLeftR = node.borderRadiusTopLeft;
4
- var topRightR = node.borderRadiusTopRight;
5
- var bottomLeftR = node.borderRadiusBottomLeft;
6
- var bottomRightR = node.borderRadiusBottomRight;
7
-
8
-
9
- var w = node.rect.width > node.rect.height ? node.rect.height : node.rect.width;
10
-
11
-
12
- if (node.borderRadiusTopLeft < 1) {
13
-
14
- topLeftR = w * node.borderRadiusTopLeft;
15
-
2
+ var wr = node.borderRadius;
3
+ var hr = node.borderRadius;
4
+ if (node.borderRadius < 1) {
5
+ wr = node.rect.width * node.borderRadius;
6
+ hr = node.rect.height * node.borderRadius;
16
7
  }
17
- if (node.borderRadiusTopRight < 1) {
18
-
19
- topRightR = w * node.borderRadiusTopRight;
20
-
8
+ var r = wr < hr ? wr : hr;
9
+ if (node.rect.width < 2 * r) {
10
+ r = node.rect.width / 2;
21
11
  }
22
- if (node.borderRadiusBottomLeft < 1) {
23
-
24
- bottomLeftR = w * node.borderRadiusBottomLeft;
25
-
12
+ if (node.rect.height < 2 * r) {
13
+ r = node.rect.height / 2;
26
14
  }
27
- if (node.borderRadiusBottomRight < 1) {
28
-
29
- bottomRightR = w * node.borderRadiusBottomRight;
30
-
31
- }
32
-
33
- var tlr = topLeftR;
34
- if (w < 2 * tlr) {
35
- tlr = w / 2
36
- }
37
-
38
- var trr = topRightR;
39
- if (w < 2 * trr) {
40
- trr = w / 2
41
- }
42
-
43
- var blr = bottomLeftR;
44
- if (w < 2 * blr) {
45
- blr = w / 2
46
- }
47
-
48
- var brr = bottomRightR;
49
- if (w < 2 * brr) {
50
- brr = w / 2
51
- }
52
-
53
15
  ctx.beginPath();
54
-
55
- ctx.moveTo(node.rect.x + tlr, node.rect.y);
56
- ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, trr);
57
- ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, brr);
58
- ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, blr);
59
- ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, tlr);
16
+ ctx.moveTo(node.rect.x + r, node.rect.y);
17
+ ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
18
+ ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
19
+ ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
20
+ ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
60
21
  ctx.closePath();
61
22
  (node.fillStyle || node.bkType) && ctx.fill();
62
23
  ctx.stroke();
@@ -1,4 +1,4 @@
1
- import { Rect } from '../../models';
1
+ import { Rect } from '../../models/rect';
2
2
  export function rectangleIconRect(node) {
3
3
  node.iconRect = new Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
4
4
  node.fullIconRect = new Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
@@ -0,0 +1,26 @@
1
+ import { Pen } from './pen';
2
+ import { Lock } from './status';
3
+ export declare class TopologyData {
4
+ pens: Pen[];
5
+ lineName: string;
6
+ fromArrowType: string;
7
+ toArrowType: string;
8
+ scale: number;
9
+ locked: Lock;
10
+ bkImage: string;
11
+ bkColor: string;
12
+ grid?: boolean;
13
+ websocket?: string;
14
+ mqttUrl?: string;
15
+ mqttOptions?: {
16
+ clientId?: string;
17
+ username?: string;
18
+ password?: string;
19
+ };
20
+ mqttTopics?: string;
21
+ manualCps?: boolean;
22
+ dataConstruct?: any;
23
+ data?: any;
24
+ bkImageRect?: any;
25
+ constructor(json?: any);
26
+ }
@@ -0,0 +1,77 @@
1
+ import { Node } from './node';
2
+ import { Line } from './line';
3
+ import { Lock } from './status';
4
+ import { s8 } from '../utils';
5
+ var TopologyData = /** @class */ (function () {
6
+ function TopologyData(json) {
7
+ this.pens = [];
8
+ this.lineName = 'curve';
9
+ this.fromArrowType = '';
10
+ this.toArrowType = 'triangleSolid';
11
+ this.scale = 1;
12
+ this.locked = Lock.None;
13
+ this.bkImageRect = null;
14
+ this.mqttOptions = {
15
+ clientId: s8()
16
+ };
17
+ this.dataConstruct = {};
18
+ if (json) {
19
+ this.pens = [];
20
+ json.dataConstruct = {};
21
+ for (var _i = 0, _a = json.pens; _i < _a.length; _i++) {
22
+ var item = _a[_i];
23
+ if (item.from) {
24
+ this.pens.push(new Line(item));
25
+ }
26
+ else {
27
+ if(item.name === 'formTable') {
28
+ json.dataConstruct[item.id] = {
29
+ id: item.id,
30
+ name: 'table'
31
+ }
32
+ }
33
+ this.pens.push(new Node(item));
34
+ }
35
+ }
36
+ this.lineName = json.lineName || 'curve';
37
+ this.fromArrowType = json.fromArrowType || '';
38
+ this.toArrowType = json.toArrowType || 'triangleSolid';
39
+ this.scale = json.scale || 1;
40
+ this.locked = json.locked || Lock.None;
41
+ this.bkImage = json.bkImage;
42
+ this.bkColor = json.bkColor;
43
+ this.grid = json.grid;
44
+ this.manualCps = json.manualCps;
45
+ this.websocket = json.websocket;
46
+ this.mqttUrl = json.mqttUrl;
47
+ this.bkImageRect = json.bkImageRect;
48
+ if (json.mqttOptions) {
49
+ var opts = '';
50
+ if (typeof json.mqttOptions === 'object') {
51
+ opts = JSON.stringify(json.mqttOptions);
52
+ }
53
+ else {
54
+ opts = json.mqttOptions + '';
55
+ }
56
+ this.mqttOptions = JSON.parse(opts);
57
+ }
58
+ else {
59
+ this.mqttOptions = { clientId: s8() };
60
+ }
61
+ this.dataConstruct = json.dataConstruct ? json.dataConstruct : {};
62
+ this.mqttTopics = json.mqttTopics;
63
+ if (typeof json.data === 'object') {
64
+ this.data = JSON.parse(JSON.stringify(json.data));
65
+ }
66
+ else {
67
+ this.data = json.data || '';
68
+ }
69
+ }
70
+ if (!this.mqttOptions) {
71
+ this.mqttOptions = { clientId: s8() };
72
+ }
73
+ }
74
+ return TopologyData;
75
+ }());
76
+ export { TopologyData };
77
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../packages/core/src/models/data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B;IAsBE,sBAAY,IAAU;QArBtB,SAAI,GAAU,EAAE,CAAC;QACjB,aAAQ,GAAG,OAAO,CAAC;QACnB,kBAAa,GAAG,EAAE,CAAC;QACnB,gBAAW,GAAG,eAAe,CAAC;QAC9B,UAAK,GAAG,CAAC,CAAC;QACV,WAAM,GAAG,IAAI,CAAC,IAAI,CAAC;QAMnB,gBAAW,GAIP;YACA,QAAQ,EAAE,EAAE,EAAE;SACf,CAAC;QAKF,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;YACf,KAAmB,UAAS,EAAT,KAAA,IAAI,CAAC,IAAI,EAAT,cAAS,EAAT,IAAS,EAAE;gBAAzB,IAAM,IAAI,SAAA;gBACb,IAAI,IAAI,CAAC,IAAI,EAAE;oBACb,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;iBAChC;qBAAM;oBACL,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;iBAChC;aACF;YACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAC;YACzC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC;YAC9C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,eAAe,CAAC;YACvD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC;YACvC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YAEhC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC5B,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,IAAI,IAAI,GAAG,EAAE,CAAC;gBACd,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;oBACxC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBACzC;qBAAM;oBACL,IAAI,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;iBAC9B;gBACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACrC;iBAAM;gBACL,IAAI,CAAC,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;aACvC;YACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAElC,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aACnD;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;aAC7B;SACF;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;SACvC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAnED,IAmEC"}
@@ -1,3 +1,4 @@
1
+ export * from './data';
1
2
  export * from './pen';
2
3
  export * from './node';
3
4
  export * from './line';
@@ -1,3 +1,4 @@
1
+ export * from './data';
1
2
  export * from './pen';
2
3
  export * from './node';
3
4
  export * from './line';
@@ -417,19 +417,19 @@ var Line = /** @class */ (function (_super) {
417
417
  }
418
418
  Store.set(this.generateStoreKey('pts-') + this.id, null);
419
419
  };
420
- Line.prototype.scale = function (scale, center, w, h) {
421
- this.from.x = center.x - (center.x - this.from.x) * w;
422
- this.from.y = center.y - (center.y - this.from.y) * h;
423
- this.to.x = center.x - (center.x - this.to.x) * w;
424
- this.to.y = center.y - (center.y - this.to.y) * h;
420
+ Line.prototype.scale = function (scale, center) {
421
+ this.from.x = center.x - (center.x - this.from.x) * scale;
422
+ this.from.y = center.y - (center.y - this.from.y) * scale;
423
+ this.to.x = center.x - (center.x - this.to.x) * scale;
424
+ this.to.y = center.y - (center.y - this.to.y) * scale;
425
425
  if (this.text && this.font && this.font.fontSize) {
426
426
  this.font.fontSize *= scale;
427
427
  this.textRect = null;
428
428
  }
429
429
  for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
430
430
  var pt = _a[_i];
431
- pt.x = center.x - (center.x - pt.x) * w;
432
- pt.y = center.y - (center.y - pt.y) * h;
431
+ pt.x = center.x - (center.x - pt.x) * scale;
432
+ pt.y = center.y - (center.y - pt.y) * scale;
433
433
  }
434
434
  Store.set(this.generateStoreKey('pts-') + this.id, null);
435
435
  };
@@ -7,12 +7,6 @@ export declare const images: {
7
7
  cnt: number;
8
8
  };
9
9
  };
10
- export declare const defaultImages: {
11
- [key: string]: {
12
- img: string;
13
- status: number;
14
- };
15
- };
16
10
  export declare class Node extends Pen {
17
11
  is3D: boolean;
18
12
  z: number;
@@ -58,10 +52,6 @@ export declare class Node extends Pen {
58
52
  linear: boolean;
59
53
  state: Node;
60
54
  }[];
61
- formData: {
62
- bindBlockId: string;
63
- theme: number;
64
- };
65
55
  animateAlone: boolean;
66
56
  gif: boolean;
67
57
  video: string;