Skip to content

Commit 8a41a4d

Browse files
committed
fix: 修复CR问题
1 parent c81fd06 commit 8a41a4d

5 files changed

Lines changed: 286 additions & 475 deletions

File tree

Lines changed: 280 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,286 @@
1+
// const data = {
2+
// nodes: [
3+
// {
4+
// id: 'pool-1',
5+
// type: 'pool',
6+
// x: 375,
7+
// y: 200,
8+
// properties: {
9+
// width: 300,
10+
// height: 300,
11+
// direction: 'vertical',
12+
// },
13+
// },
14+
// {
15+
// id: 'pool-2',
16+
// type: 'pool',
17+
// x: 800,
18+
// y: 200,
19+
// text: '水平泳池',
20+
// properties: {
21+
// width: 300,
22+
// height: 300,
23+
// direction: 'horizontal',
24+
// laneConfig: {
25+
// text: '水平泳道',
26+
// },
27+
// },
28+
// // text: {
29+
// // x: 515,
30+
// // y: 200,
31+
// // value: '泳池示例',
32+
// // },
33+
// },
34+
// // {
35+
// // id: '1-2',
36+
// // type: 'rect',
37+
// // x: 600,
38+
// // y: 200,
39+
// // properties: {
40+
// // width: 300,
41+
// // height: 300,
42+
// // },
43+
// // text: '其他元素',
44+
// // },
45+
// ],
46+
// edges: [],
47+
// }
48+
149
const data = {
250
nodes: [
3-
// {
4-
// id: 'pool-1',
5-
// type: 'customPool',
6-
// x: 400,
7-
// y: 200,
8-
// width: 600,
9-
// height: 300,
10-
// children: ['lane-1'],
11-
// properties: {
12-
// name: '泳池示例',
13-
// layoutDirection: 'horizontal',
14-
// },
15-
// },
16-
// {
17-
// id: 'lane-1',
18-
// type: 'customLane',
19-
// x: 400,
20-
// y: 200,
21-
// width: 600,
22-
// height: 300,
23-
// properties: {
24-
// name: '泳道示例',
25-
// layoutDirection: 'horizontal',
26-
// },
27-
// }
51+
{
52+
id: '9dfc6807-73f8-4741-8c69-e2d70f2ec934',
53+
type: 'pool',
54+
x: 511,
55+
y: 224.5,
56+
properties: {
57+
width: 400,
58+
height: 400,
59+
direction: 'horizontal',
60+
laneConfig: {
61+
text: '水平泳道',
62+
},
63+
isCollapsed: false,
64+
children: [
65+
'e5660bb9-12c7-4a2c-8be3-085eae9057be',
66+
'19c15ef0-8b61-4a8c-8544-3b9f975ace39',
67+
],
68+
},
69+
text: {
70+
x: 341,
71+
y: 224.5,
72+
value: '横向泳池',
73+
},
74+
children: [
75+
'e5660bb9-12c7-4a2c-8be3-085eae9057be',
76+
'19c15ef0-8b61-4a8c-8544-3b9f975ace39',
77+
],
78+
},
79+
{
80+
id: 'e5660bb9-12c7-4a2c-8be3-085eae9057be',
81+
type: 'lane',
82+
x: 541,
83+
y: 324.5,
84+
properties: {
85+
parent: '9dfc6807-73f8-4741-8c69-e2d70f2ec934',
86+
isHorizontal: true,
87+
isCollapsed: false,
88+
processRef: '',
89+
panels: ['processRef'],
90+
direction: 'vertical',
91+
width: 340,
92+
height: 200,
93+
children: [
94+
'e6cb89d0-01f9-4e76-82f7-09c25d5e1e07',
95+
'46e2c71b-31f6-4202-ab48-28eca90820bd',
96+
],
97+
},
98+
text: {
99+
x: 381,
100+
y: 324.5,
101+
value: '水平泳道',
102+
},
103+
children: [
104+
'e6cb89d0-01f9-4e76-82f7-09c25d5e1e07',
105+
'46e2c71b-31f6-4202-ab48-28eca90820bd',
106+
],
107+
},
108+
{
109+
id: '19c15ef0-8b61-4a8c-8544-3b9f975ace39',
110+
type: 'lane',
111+
x: 541,
112+
y: 124.5,
113+
properties: {
114+
isHorizontal: true,
115+
isCollapsed: false,
116+
processRef: '',
117+
panels: ['processRef'],
118+
direction: 'vertical',
119+
width: 340,
120+
height: 200,
121+
parent: '9dfc6807-73f8-4741-8c69-e2d70f2ec934',
122+
position: 'above',
123+
referenceLaneId: 'e5660bb9-12c7-4a2c-8be3-085eae9057be',
124+
children: [
125+
'9dbed2ef-581a-45e1-ad2e-c3b155bb8cf3',
126+
'324d535b-81d5-484f-aef7-1250e134fa76',
127+
],
128+
},
129+
text: {
130+
x: 381,
131+
y: 124.5,
132+
value: '水平泳道',
133+
},
134+
children: [
135+
'9dbed2ef-581a-45e1-ad2e-c3b155bb8cf3',
136+
'324d535b-81d5-484f-aef7-1250e134fa76',
137+
],
138+
},
139+
{
140+
id: 'e6cb89d0-01f9-4e76-82f7-09c25d5e1e07',
141+
type: 'rect',
142+
x: 458,
143+
y: 360.5,
144+
properties: {
145+
parent: 'e5660bb9-12c7-4a2c-8be3-085eae9057be',
146+
width: 100,
147+
height: 80,
148+
},
149+
text: {
150+
x: 458,
151+
y: 360.5,
152+
value: 'rect',
153+
},
154+
},
155+
{
156+
id: '46e2c71b-31f6-4202-ab48-28eca90820bd',
157+
type: 'rect',
158+
x: 612,
159+
y: 295.5,
160+
properties: {
161+
parent: 'e5660bb9-12c7-4a2c-8be3-085eae9057be',
162+
width: 100,
163+
height: 80,
164+
},
165+
text: {
166+
x: 612,
167+
y: 295.5,
168+
value: 'rect',
169+
},
170+
},
171+
{
172+
id: '9dbed2ef-581a-45e1-ad2e-c3b155bb8cf3',
173+
type: 'circle',
174+
x: 481,
175+
y: 149.5,
176+
properties: {
177+
parent: '19c15ef0-8b61-4a8c-8544-3b9f975ace39',
178+
width: 100,
179+
height: 100,
180+
},
181+
text: {
182+
x: 481,
183+
y: 149.5,
184+
value: 'circle',
185+
},
186+
},
187+
{
188+
id: '324d535b-81d5-484f-aef7-1250e134fa76',
189+
type: 'diamond',
190+
x: 624,
191+
y: 115.5,
192+
properties: {
193+
parent: '19c15ef0-8b61-4a8c-8544-3b9f975ace39',
194+
width: 60,
195+
height: 100,
196+
},
197+
text: {
198+
x: 624,
199+
y: 115.5,
200+
value: 'diamond',
201+
},
202+
},
203+
],
204+
edges: [
205+
{
206+
id: '12e14434-6916-4198-a397-8470f4f6a15c',
207+
type: 'polyline',
208+
properties: {},
209+
sourceNodeId: 'e6cb89d0-01f9-4e76-82f7-09c25d5e1e07',
210+
targetNodeId: '46e2c71b-31f6-4202-ab48-28eca90820bd',
211+
sourceAnchorId: 'e6cb89d0-01f9-4e76-82f7-09c25d5e1e07_1',
212+
targetAnchorId: '46e2c71b-31f6-4202-ab48-28eca90820bd_3',
213+
startPoint: {
214+
x: 508,
215+
y: 360.5,
216+
},
217+
endPoint: {
218+
x: 562,
219+
y: 295.5,
220+
},
221+
pointsList: [
222+
{
223+
x: 508,
224+
y: 360.5,
225+
},
226+
{
227+
x: 538,
228+
y: 360.5,
229+
},
230+
{
231+
x: 538,
232+
y: 328,
233+
},
234+
{
235+
x: 532,
236+
y: 328,
237+
},
238+
{
239+
x: 532,
240+
y: 295.5,
241+
},
242+
{
243+
x: 562,
244+
y: 295.5,
245+
},
246+
],
247+
},
248+
{
249+
id: '831c9bce-68be-45b5-9a24-012d226a0d45',
250+
type: 'polyline',
251+
properties: {},
252+
sourceNodeId: '9dbed2ef-581a-45e1-ad2e-c3b155bb8cf3',
253+
targetNodeId: '324d535b-81d5-484f-aef7-1250e134fa76',
254+
sourceAnchorId: '9dbed2ef-581a-45e1-ad2e-c3b155bb8cf3_1',
255+
targetAnchorId: '324d535b-81d5-484f-aef7-1250e134fa76_3',
256+
startPoint: {
257+
x: 531,
258+
y: 149.5,
259+
},
260+
endPoint: {
261+
x: 594,
262+
y: 115.5,
263+
},
264+
pointsList: [
265+
{
266+
x: 531,
267+
y: 149.5,
268+
},
269+
{
270+
x: 562.5,
271+
y: 149.5,
272+
},
273+
{
274+
x: 562.5,
275+
y: 115.5,
276+
},
277+
{
278+
x: 594,
279+
y: 115.5,
280+
},
281+
],
282+
},
28283
],
29-
edges: [],
30284
}
31285

32286
export default data

examples/feature-examples/src/pages/nodes/custom/pool/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useEffect, useRef } from 'react'
22
import LogicFlow from '@logicflow/core'
33
import { Flex } from 'antd'
44
import { PoolElements } from '@logicflow/extension'
5-
import data from './newData'
5+
import data from './data'
66
import '@logicflow/core/dist/index.css'
77
import './index.less'
88

0 commit comments

Comments
 (0)