luxiaotao1123
2024-03-02 0c009a44f7cd35489a56450d0aa2715b00b23c32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React, { useRef, useEffect } from "react";
 
const commonGraphPorts = {
    groups: {
        top: {
            position: 'top',
            attrs: {
                circle: {
                    magnet: true,
                    stroke: '#8f8f8f',
                    r: 5,
                },
            },
        },
        bottom: {
            position: 'bottom',
            attrs: {
                circle: {
                    magnet: true,
                    stroke: '#8f8f8f',
                    r: 5,
                },
            },
        },
        left: {
            position: 'left',
            attrs: {
                circle: {
                    magnet: true,
                    stroke: '#8f8f8f',
                    r: 5,
                },
            },
        },
        right: {
            position: 'right',
            attrs: {
                circle: {
                    magnet: true,
                    stroke: '#8f8f8f',
                    r: 5,
                },
            },
        },
    },
    items: [
        {
            id: 'port1',
            group: 'top',
        },
        {
            id: 'port2',
            group: 'bottom',
        },
        {
            id: 'port3',
            group: 'left',
        },
        {
            id: 'port4',
            group: 'right',
        },
    ],
}
 
const commonGraphAttrs = {
    body: {
        fill: '#efefef',
        stroke: '#4d4d4d',
        strokeWidth: 2,
    },
}
 
export { commonGraphPorts, commonGraphAttrs }