@next-bricks/diagram 0.56.1 → 0.57.0
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.
- package/dist/bricks.json +4 -4
- package/dist/chunks/8436.38f6bb4d.js +2 -0
- package/dist/chunks/8436.38f6bb4d.js.map +1 -0
- package/dist/chunks/9024.9fb24b35.js +2 -0
- package/dist/chunks/9024.9fb24b35.js.map +1 -0
- package/dist/chunks/{9711.a67e7f03.js → 9711.6468901d.js} +2 -2
- package/dist/chunks/{9711.a67e7f03.js.map → 9711.6468901d.js.map} +1 -1
- package/dist/chunks/{eo-display-canvas.28d0385d.js → eo-display-canvas.d3d4fa57.js} +2 -2
- package/dist/chunks/{eo-display-canvas.28d0385d.js.map → eo-display-canvas.d3d4fa57.js.map} +1 -1
- package/dist/chunks/{eo-draw-canvas.4b11d12e.js → eo-draw-canvas.c41d08df.js} +2 -2
- package/dist/chunks/{eo-draw-canvas.4b11d12e.js.map → eo-draw-canvas.c41d08df.js.map} +1 -1
- package/dist/chunks/{main.caa1be21.js → main.cab55157.js} +2 -2
- package/dist/chunks/{main.caa1be21.js.map → main.cab55157.js.map} +1 -1
- package/dist/examples.json +6 -6
- package/dist/{index.e4a680fa.js → index.e995f9bc.js} +2 -2
- package/dist/{index.e4a680fa.js.map → index.e995f9bc.js.map} +1 -1
- package/dist/manifest.json +178 -178
- package/dist/types.json +100 -74
- package/dist-types/diagram/lines/curveLine.d.ts +2 -1
- package/dist-types/diagram/lines/intersect.d.ts +2 -0
- package/dist-types/diagram/lines/intersect.spec.d.ts +1 -0
- package/dist-types/draw-canvas/interfaces.d.ts +17 -4
- package/dist-types/shared/canvas/collectLineJumpsFactory.d.ts +3 -0
- package/dist-types/shared/canvas/collectLineJumpsFactory.spec.d.ts +1 -0
- package/docs/eo-draw-canvas.md +2 -0
- package/package.json +2 -2
- package/dist/chunks/5903.c898abec.js +0 -2
- package/dist/chunks/5903.c898abec.js.map +0 -1
- package/dist/chunks/8436.107dc714.js +0 -2
- package/dist/chunks/8436.107dc714.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -3,6 +3,170 @@
|
|
|
3
3
|
"package": "@next-bricks/diagram",
|
|
4
4
|
"name": "diagram",
|
|
5
5
|
"bricks": [
|
|
6
|
+
{
|
|
7
|
+
"name": "diagram.editable-label",
|
|
8
|
+
"properties": [
|
|
9
|
+
{
|
|
10
|
+
"name": "label",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "type",
|
|
15
|
+
"type": "LabelType"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "readOnly",
|
|
19
|
+
"type": "boolean"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"events": [
|
|
23
|
+
{
|
|
24
|
+
"name": "label.editing.change",
|
|
25
|
+
"detail": {
|
|
26
|
+
"type": "boolean"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "label.change",
|
|
31
|
+
"detail": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"slots": [],
|
|
37
|
+
"methods": [
|
|
38
|
+
{
|
|
39
|
+
"name": "enableEditing",
|
|
40
|
+
"params": []
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"parts": [],
|
|
44
|
+
"description": "构件 `diagram.editable-label`"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "eo-display-canvas",
|
|
48
|
+
"properties": [
|
|
49
|
+
{
|
|
50
|
+
"name": "cells",
|
|
51
|
+
"description": "用于查看的画布可以更新 `cells` 属性。",
|
|
52
|
+
"attribute": false,
|
|
53
|
+
"type": "InitialCell[]"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "layout",
|
|
57
|
+
"type": "LayoutType"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "layoutOptions",
|
|
61
|
+
"attribute": false,
|
|
62
|
+
"type": "LayoutOptions"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "defaultNodeSize",
|
|
66
|
+
"attribute": false,
|
|
67
|
+
"type": "SizeTuple",
|
|
68
|
+
"default": "[DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE]"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "defaultNodeBricks",
|
|
72
|
+
"attribute": false,
|
|
73
|
+
"type": "NodeBrickConf[]"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "degradedThreshold",
|
|
77
|
+
"description": "当节点数量达到或超过 `degradedThreshold` 时,节点将被降级展示。",
|
|
78
|
+
"default": "500",
|
|
79
|
+
"type": "number"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "degradedNodeLabel",
|
|
83
|
+
"description": "设置节点将降级展示时显示的名称。",
|
|
84
|
+
"default": "\"<% DATA.node.id %>\"",
|
|
85
|
+
"attribute": false,
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "defaultEdgeLines",
|
|
90
|
+
"description": "使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n\n```yaml\ndefaultEdgeLines:\n - if: <% DATA.edge.data?.virtual %>\n dashed: true\n```",
|
|
91
|
+
"attribute": false,
|
|
92
|
+
"type": "EdgeLineConf[]"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "activeTarget",
|
|
96
|
+
"attribute": false,
|
|
97
|
+
"type": "ActiveTarget | null"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "fadeUnrelatedCells",
|
|
101
|
+
"description": "当鼠标悬浮到某节点上时,隐藏其他跟该节点无关的元素。",
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "zoomable",
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"default": "true"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "scrollable",
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"default": "true"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "pannable",
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": "true"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "scaleRange",
|
|
121
|
+
"attribute": false,
|
|
122
|
+
"type": "RangeTuple"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "hideZoomBar",
|
|
126
|
+
"description": "隐藏右下角放大缩小的控制栏",
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "autoCenterWhenCellsChange",
|
|
131
|
+
"description": "每当 cells 改变时,重新自动居中",
|
|
132
|
+
"type": "boolean"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "doNotResetActiveTargetForSelector",
|
|
136
|
+
"description": "选择器,点击该选择器对应的元素时不重置 `activeTarget`。",
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "doNotResetActiveTargetOutsideCanvas",
|
|
141
|
+
"description": "在画布外点击时不重置 `activeTarget`。",
|
|
142
|
+
"type": "boolean"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"events": [
|
|
146
|
+
{
|
|
147
|
+
"name": "activeTarget.change",
|
|
148
|
+
"detail": {
|
|
149
|
+
"type": "ActiveTarget | null"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "cell.contextmenu",
|
|
154
|
+
"detail": {
|
|
155
|
+
"type": "CellContextMenuDetail"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "cell.click",
|
|
160
|
+
"detail": {
|
|
161
|
+
"type": "CellContextMenuDetail"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"slots": [],
|
|
166
|
+
"methods": [],
|
|
167
|
+
"parts": [],
|
|
168
|
+
"description": "用于展示查看的画布。"
|
|
169
|
+
},
|
|
6
170
|
{
|
|
7
171
|
"name": "eo-diagram",
|
|
8
172
|
"properties": [
|
|
@@ -139,128 +303,45 @@
|
|
|
139
303
|
"description": "构件 `eo-diagram`"
|
|
140
304
|
},
|
|
141
305
|
{
|
|
142
|
-
"name": "
|
|
306
|
+
"name": "diagram.experimental-node",
|
|
143
307
|
"properties": [
|
|
144
308
|
{
|
|
145
|
-
"name": "
|
|
146
|
-
"
|
|
147
|
-
"attribute": false,
|
|
148
|
-
"type": "InitialCell[]"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"name": "layout",
|
|
152
|
-
"type": "LayoutType"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "layoutOptions",
|
|
156
|
-
"attribute": false,
|
|
157
|
-
"type": "LayoutOptions"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "defaultNodeSize",
|
|
161
|
-
"attribute": false,
|
|
162
|
-
"type": "SizeTuple",
|
|
163
|
-
"default": "[DEFAULT_NODE_SIZE, DEFAULT_NODE_SIZE]"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"name": "defaultNodeBricks",
|
|
167
|
-
"attribute": false,
|
|
168
|
-
"type": "NodeBrickConf[]"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"name": "degradedThreshold",
|
|
172
|
-
"description": "当节点数量达到或超过 `degradedThreshold` 时,节点将被降级展示。",
|
|
173
|
-
"default": "500",
|
|
174
|
-
"type": "number"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"name": "degradedNodeLabel",
|
|
178
|
-
"description": "设置节点将降级展示时显示的名称。",
|
|
179
|
-
"default": "\"<% DATA.node.id %>\"",
|
|
180
|
-
"attribute": false,
|
|
181
|
-
"type": "string"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"name": "defaultEdgeLines",
|
|
185
|
-
"description": "使用条件判断设置默认的边对应的连线。在 `if` 表达式中 `DATA` 为 `{ edge }`,例如:\n\n```yaml\ndefaultEdgeLines:\n - if: <% DATA.edge.data?.virtual %>\n dashed: true\n```",
|
|
186
|
-
"attribute": false,
|
|
187
|
-
"type": "EdgeLineConf[]"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "activeTarget",
|
|
191
|
-
"attribute": false,
|
|
192
|
-
"type": "ActiveTarget | null"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"name": "fadeUnrelatedCells",
|
|
196
|
-
"description": "当鼠标悬浮到某节点上时,隐藏其他跟该节点无关的元素。",
|
|
197
|
-
"type": "boolean"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"name": "zoomable",
|
|
201
|
-
"type": "boolean",
|
|
202
|
-
"default": "true"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"name": "scrollable",
|
|
206
|
-
"type": "boolean",
|
|
207
|
-
"default": "true"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"name": "pannable",
|
|
211
|
-
"type": "boolean",
|
|
212
|
-
"default": "true"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"name": "scaleRange",
|
|
216
|
-
"attribute": false,
|
|
217
|
-
"type": "RangeTuple"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name": "hideZoomBar",
|
|
221
|
-
"description": "隐藏右下角放大缩小的控制栏",
|
|
222
|
-
"type": "boolean"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "autoCenterWhenCellsChange",
|
|
226
|
-
"description": "每当 cells 改变时,重新自动居中",
|
|
227
|
-
"type": "boolean"
|
|
309
|
+
"name": "usage",
|
|
310
|
+
"type": "ExperimentalUsage"
|
|
228
311
|
},
|
|
229
312
|
{
|
|
230
|
-
"name": "
|
|
231
|
-
"
|
|
232
|
-
"type": "string"
|
|
313
|
+
"name": "status",
|
|
314
|
+
"type": "NodeStatus"
|
|
233
315
|
},
|
|
234
316
|
{
|
|
235
|
-
"name": "
|
|
236
|
-
"
|
|
237
|
-
"type": "boolean"
|
|
317
|
+
"name": "decorator",
|
|
318
|
+
"type": "DecoratorType"
|
|
238
319
|
}
|
|
239
320
|
],
|
|
240
321
|
"events": [
|
|
241
322
|
{
|
|
242
|
-
"name": "
|
|
323
|
+
"name": "drag.start",
|
|
243
324
|
"detail": {
|
|
244
|
-
"type": "
|
|
325
|
+
"type": "PositionTuple"
|
|
245
326
|
}
|
|
246
327
|
},
|
|
247
328
|
{
|
|
248
|
-
"name": "
|
|
329
|
+
"name": "drag.move",
|
|
249
330
|
"detail": {
|
|
250
|
-
"type": "
|
|
331
|
+
"type": "PositionTuple"
|
|
251
332
|
}
|
|
252
333
|
},
|
|
253
334
|
{
|
|
254
|
-
"name": "
|
|
335
|
+
"name": "drag.end",
|
|
255
336
|
"detail": {
|
|
256
|
-
"type": "
|
|
337
|
+
"type": "PositionTuple"
|
|
257
338
|
}
|
|
258
339
|
}
|
|
259
340
|
],
|
|
260
341
|
"slots": [],
|
|
261
342
|
"methods": [],
|
|
262
343
|
"parts": [],
|
|
263
|
-
"description": "
|
|
344
|
+
"description": "构件 `diagram.experimental-node`"
|
|
264
345
|
},
|
|
265
346
|
{
|
|
266
347
|
"name": "eo-draw-canvas",
|
|
@@ -563,87 +644,6 @@
|
|
|
563
644
|
],
|
|
564
645
|
"parts": [],
|
|
565
646
|
"description": "用于手工绘图的画布。\n\n注意:将配套另外一个用于展示的画布构件。"
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"name": "diagram.experimental-node",
|
|
569
|
-
"properties": [
|
|
570
|
-
{
|
|
571
|
-
"name": "usage",
|
|
572
|
-
"type": "ExperimentalUsage"
|
|
573
|
-
},
|
|
574
|
-
{
|
|
575
|
-
"name": "status",
|
|
576
|
-
"type": "NodeStatus"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"name": "decorator",
|
|
580
|
-
"type": "DecoratorType"
|
|
581
|
-
}
|
|
582
|
-
],
|
|
583
|
-
"events": [
|
|
584
|
-
{
|
|
585
|
-
"name": "drag.start",
|
|
586
|
-
"detail": {
|
|
587
|
-
"type": "PositionTuple"
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
"name": "drag.move",
|
|
592
|
-
"detail": {
|
|
593
|
-
"type": "PositionTuple"
|
|
594
|
-
}
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
"name": "drag.end",
|
|
598
|
-
"detail": {
|
|
599
|
-
"type": "PositionTuple"
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
],
|
|
603
|
-
"slots": [],
|
|
604
|
-
"methods": [],
|
|
605
|
-
"parts": [],
|
|
606
|
-
"description": "构件 `diagram.experimental-node`"
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
"name": "diagram.editable-label",
|
|
610
|
-
"properties": [
|
|
611
|
-
{
|
|
612
|
-
"name": "label",
|
|
613
|
-
"type": "string"
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"name": "type",
|
|
617
|
-
"type": "LabelType"
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
"name": "readOnly",
|
|
621
|
-
"type": "boolean"
|
|
622
|
-
}
|
|
623
|
-
],
|
|
624
|
-
"events": [
|
|
625
|
-
{
|
|
626
|
-
"name": "label.editing.change",
|
|
627
|
-
"detail": {
|
|
628
|
-
"type": "boolean"
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"name": "label.change",
|
|
633
|
-
"detail": {
|
|
634
|
-
"type": "string"
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
],
|
|
638
|
-
"slots": [],
|
|
639
|
-
"methods": [
|
|
640
|
-
{
|
|
641
|
-
"name": "enableEditing",
|
|
642
|
-
"params": []
|
|
643
|
-
}
|
|
644
|
-
],
|
|
645
|
-
"parts": [],
|
|
646
|
-
"description": "构件 `diagram.editable-label`"
|
|
647
647
|
}
|
|
648
648
|
],
|
|
649
649
|
"providers": []
|
package/dist/types.json
CHANGED
|
@@ -1,4 +1,78 @@
|
|
|
1
1
|
{
|
|
2
|
+
"diagram.editable-label": {
|
|
3
|
+
"properties": [
|
|
4
|
+
{
|
|
5
|
+
"name": "label",
|
|
6
|
+
"annotation": {
|
|
7
|
+
"type": "keyword",
|
|
8
|
+
"value": "string"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "type",
|
|
13
|
+
"annotation": {
|
|
14
|
+
"type": "reference",
|
|
15
|
+
"typeName": {
|
|
16
|
+
"type": "identifier",
|
|
17
|
+
"name": "LabelType"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "readOnly",
|
|
23
|
+
"annotation": {
|
|
24
|
+
"type": "keyword",
|
|
25
|
+
"value": "boolean"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"events": [
|
|
30
|
+
{
|
|
31
|
+
"name": "label.editing.change",
|
|
32
|
+
"detail": {
|
|
33
|
+
"annotation": {
|
|
34
|
+
"type": "keyword",
|
|
35
|
+
"value": "boolean"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "label.change",
|
|
41
|
+
"detail": {
|
|
42
|
+
"annotation": {
|
|
43
|
+
"type": "keyword",
|
|
44
|
+
"value": "string"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"methods": [
|
|
50
|
+
{
|
|
51
|
+
"name": "enableEditing",
|
|
52
|
+
"params": [],
|
|
53
|
+
"returns": {}
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"types": [
|
|
57
|
+
{
|
|
58
|
+
"type": "typeAlias",
|
|
59
|
+
"name": "LabelType",
|
|
60
|
+
"annotation": {
|
|
61
|
+
"type": "union",
|
|
62
|
+
"types": [
|
|
63
|
+
{
|
|
64
|
+
"type": "jsLiteral",
|
|
65
|
+
"value": "line"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "jsLiteral",
|
|
69
|
+
"value": "default"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
2
76
|
"diagram.experimental-node": {
|
|
3
77
|
"properties": [
|
|
4
78
|
{
|
|
@@ -172,80 +246,6 @@
|
|
|
172
246
|
}
|
|
173
247
|
]
|
|
174
248
|
},
|
|
175
|
-
"diagram.editable-label": {
|
|
176
|
-
"properties": [
|
|
177
|
-
{
|
|
178
|
-
"name": "label",
|
|
179
|
-
"annotation": {
|
|
180
|
-
"type": "keyword",
|
|
181
|
-
"value": "string"
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"name": "type",
|
|
186
|
-
"annotation": {
|
|
187
|
-
"type": "reference",
|
|
188
|
-
"typeName": {
|
|
189
|
-
"type": "identifier",
|
|
190
|
-
"name": "LabelType"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"name": "readOnly",
|
|
196
|
-
"annotation": {
|
|
197
|
-
"type": "keyword",
|
|
198
|
-
"value": "boolean"
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
],
|
|
202
|
-
"events": [
|
|
203
|
-
{
|
|
204
|
-
"name": "label.editing.change",
|
|
205
|
-
"detail": {
|
|
206
|
-
"annotation": {
|
|
207
|
-
"type": "keyword",
|
|
208
|
-
"value": "boolean"
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"name": "label.change",
|
|
214
|
-
"detail": {
|
|
215
|
-
"annotation": {
|
|
216
|
-
"type": "keyword",
|
|
217
|
-
"value": "string"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
"methods": [
|
|
223
|
-
{
|
|
224
|
-
"name": "enableEditing",
|
|
225
|
-
"params": [],
|
|
226
|
-
"returns": {}
|
|
227
|
-
}
|
|
228
|
-
],
|
|
229
|
-
"types": [
|
|
230
|
-
{
|
|
231
|
-
"type": "typeAlias",
|
|
232
|
-
"name": "LabelType",
|
|
233
|
-
"annotation": {
|
|
234
|
-
"type": "union",
|
|
235
|
-
"types": [
|
|
236
|
-
{
|
|
237
|
-
"type": "jsLiteral",
|
|
238
|
-
"value": "line"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"type": "jsLiteral",
|
|
242
|
-
"value": "default"
|
|
243
|
-
}
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
]
|
|
248
|
-
},
|
|
249
249
|
"eo-draw-canvas": {
|
|
250
250
|
"properties": [
|
|
251
251
|
{
|
|
@@ -2650,6 +2650,19 @@
|
|
|
2650
2650
|
},
|
|
2651
2651
|
"optional": true,
|
|
2652
2652
|
"computed": false
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
"type": "propertySignature",
|
|
2656
|
+
"key": {
|
|
2657
|
+
"type": "identifier",
|
|
2658
|
+
"name": "jumps"
|
|
2659
|
+
},
|
|
2660
|
+
"annotation": {
|
|
2661
|
+
"type": "keyword",
|
|
2662
|
+
"value": "boolean"
|
|
2663
|
+
},
|
|
2664
|
+
"optional": true,
|
|
2665
|
+
"computed": false
|
|
2653
2666
|
}
|
|
2654
2667
|
]
|
|
2655
2668
|
},
|
|
@@ -7830,6 +7843,19 @@
|
|
|
7830
7843
|
},
|
|
7831
7844
|
"optional": true,
|
|
7832
7845
|
"computed": false
|
|
7846
|
+
},
|
|
7847
|
+
{
|
|
7848
|
+
"type": "propertySignature",
|
|
7849
|
+
"key": {
|
|
7850
|
+
"type": "identifier",
|
|
7851
|
+
"name": "jumps"
|
|
7852
|
+
},
|
|
7853
|
+
"annotation": {
|
|
7854
|
+
"type": "keyword",
|
|
7855
|
+
"value": "boolean"
|
|
7856
|
+
},
|
|
7857
|
+
"optional": true,
|
|
7858
|
+
"computed": false
|
|
7833
7859
|
}
|
|
7834
7860
|
]
|
|
7835
7861
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CurveType, NodePosition } from "../interfaces";
|
|
2
|
+
import type { LineSegmentJumps } from "../../draw-canvas/interfaces";
|
|
2
3
|
/**
|
|
3
4
|
* Generate Line from points
|
|
4
5
|
*/
|
|
5
|
-
export declare function curveLine(points: Array<NodePosition> | null | undefined, curveType: CurveType | undefined, startOffset: number, endOffset: number): string;
|
|
6
|
+
export declare function curveLine(points: Array<NodePosition> | null | undefined, curveType: CurveType | undefined, startOffset: number, endOffset: number, jumpsMap?: Map<number, LineSegmentJumps> | null): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -129,6 +129,7 @@ export interface BaseEdgeLineConf {
|
|
|
129
129
|
showEndArrow?: boolean;
|
|
130
130
|
animate?: LineAnimate;
|
|
131
131
|
overrides?: EdgeLineConfOverrides;
|
|
132
|
+
jumps?: boolean;
|
|
132
133
|
}
|
|
133
134
|
export interface EdgeLineConfOverrides {
|
|
134
135
|
active?: EdgeLineConfOverridable;
|
|
@@ -341,17 +342,18 @@ export interface ControlPoint extends NodePosition {
|
|
|
341
342
|
index: number;
|
|
342
343
|
}
|
|
343
344
|
export type EditableLine = EditableEdgeLine | EditableDecoratorLine;
|
|
344
|
-
export interface EditableEdgeLine {
|
|
345
|
+
export interface EditableEdgeLine extends BaseEditableLine {
|
|
345
346
|
edge: EdgeCell;
|
|
346
|
-
points: NodePosition[];
|
|
347
347
|
source: NodeBrickCell | DecoratorCell;
|
|
348
348
|
target: NodeBrickCell | DecoratorCell;
|
|
349
|
-
parallelGap: number;
|
|
350
349
|
}
|
|
351
|
-
export interface EditableDecoratorLine {
|
|
350
|
+
export interface EditableDecoratorLine extends BaseEditableLine {
|
|
352
351
|
decorator: DecoratorCell;
|
|
352
|
+
}
|
|
353
|
+
export interface BaseEditableLine {
|
|
353
354
|
points: NodePosition[];
|
|
354
355
|
parallelGap: number;
|
|
356
|
+
jumpsMap?: Map<number, LineSegmentJumps> | null;
|
|
355
357
|
}
|
|
356
358
|
export type PositionAndAngle = [
|
|
357
359
|
x: number,
|
|
@@ -360,3 +362,14 @@ export type PositionAndAngle = [
|
|
|
360
362
|
angle: number,
|
|
361
363
|
offset: number
|
|
362
364
|
];
|
|
365
|
+
/**
|
|
366
|
+
* 一段线段上的交叉跨线点列表
|
|
367
|
+
*/
|
|
368
|
+
export interface LineSegmentJumps {
|
|
369
|
+
/** 交叉跨线圆弧的中心点列表,这些点应该遵循从线段起点到终点的顺序 */
|
|
370
|
+
jumpPoints: NodePosition[];
|
|
371
|
+
/** 该线段在整个连线中的索引 */
|
|
372
|
+
index: number;
|
|
373
|
+
/** 交叉跨线圆弧的半径 */
|
|
374
|
+
radius: number;
|
|
375
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComputedEdgeLineConf, LineSegmentJumps } from "../../draw-canvas/interfaces";
|
|
2
|
+
import type { NodePosition } from "../../diagram/interfaces";
|
|
3
|
+
export declare function collectLineJumpsFactory(): (points: NodePosition[], lineConf: ComputedEdgeLineConf) => Map<number, LineSegmentJumps> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/docs/eo-draw-canvas.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/diagram",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/diagram",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@next-bricks/basic": "*"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "bd1caf612bd2673b14bea015b95569f137c35327"
|
|
45
45
|
}
|