forked from xyflow/vite-react-flow-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
178 lines (174 loc) · 5.33 KB
/
index.ts
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import type { Node, NodeTypes } from "reactflow";
import { PositionLoggerNode } from "./PositionLoggerNode";
import SimpleNode from '../SimpleNode';
import GroupNode from '../GroupNode';
// Define the width and height of one grid
const grid_width = 100;
const grid_height = 100;
const grid_gap = 5;
interface NodeData {
label: string;
}
// first groups of nodes then their nodes then nodes
export const initialNodes = [
// 👯♀️ groups
{
id: 'trustees',
type: 'group',
data: { label: 'The Trustees' },
position: { x: 2 * grid_width + 1 * grid_gap, y: 1 * grid_height + 1 * grid_gap },
className: 'light',
style: { backgroundColor: 'rgba(255, 0, 0, 0.1)', width: 3 * grid_width - 2 * grid_gap, height: 2 * grid_height - 2 * grid_gap },
},
{
id: 'abigail',
type: 'node',
data: { label: 'Abigal Black Elbaum' },
position: { x: 0 * grid_width + 1 * grid_gap, y: 1 * grid_height + 1 * grid_gap },
parentNode: 'trustees',
},
{
id: 'victor',
type: 'node',
data: { label: 'Victor Mendelson' },
position: { x: 1 * grid_width + 1 * grid_gap, y: 0.5 * grid_height + 1 * grid_gap },
parentNode: 'trustees',
},
{
id: 'jeh',
type: 'node',
data: { label: 'Jeh Johnson' },
position: { x: 2 * grid_width + 1 * grid_gap, y: 0 * grid_height + 1 * grid_gap },
parentNode: 'trustees',
},
{
id: 'movement',
type: 'group',
data: { label: 'THE MOVEMENT' },
position: { x: -2 * grid_width + 1 * grid_gap, y: 0 * grid_height + 1 * grid_gap },
style: { backgroundColor: 'rgba(255, 0, 0, 0.1)', width: 1 * grid_height - 2 * grid_gap, height: 3 * grid_width - 2 * grid_gap },
},
{
id: 'students',
type: 'node',
data: { label: 'Student Protestors' },
position: { x: 0 * grid_width + 1 * grid_gap, y: 0 * grid_height + 1 * grid_gap },
className: 'light',
parentNode: 'movement',
},
{
id: 'faculty',
type: 'node',
data: { label: 'Faculty, Staff and Alum Allies' },
position: { x: 0 * grid_width + 1 * grid_gap, y: 2 * grid_height + 1 * grid_gap },
className: 'light',
parentNode: 'movement',
},
{
id: 'neighbors',
type: 'node',
data: { label: 'Neighbors + Community Orgs in Harlem/NYC' },
position: { x: 0 * grid_width + 1 * grid_gap, y: 1 * grid_height + 1 * grid_gap },
className: 'light',
parentNode: 'movement',
},
{
id: 'genocide',
type: 'group',
data: { label: 'APARTHEID OCCUPATION GENOCIDE' },
position: { x: 10 * grid_width + 1 * grid_gap, y: 0 * grid_height + 1 * grid_gap },
style: { width: 1 * grid_width - 2 * grid_gap, height: 1 * grid_height - 2 * grid_gap },
},
{
id: 'iof',
type: 'node',
data: { label: 'Israeli Occupation Forces (IOF)' },
position: { x: 0 * grid_width + 1 * grid_gap, y: 0 * grid_height + 1 * grid_gap },
parentNode: 'genocide',
},
{
id: 'profiteers',
type: 'group',
data: { label: 'War Profiteers' },
position: { x: 6 * grid_width + 1 * grid_gap, y: 1 * grid_height + 1 * grid_gap },
style: { width: 2 * grid_width - 2 * grid_gap, height: 5 * grid_width - 2 * grid_gap },
},
{
id: 'lockheed',
type: 'node',
data: { label: 'Lockheed Martin' },
position: { x: 1 * grid_width + 1 * grid_gap, y: 0 * grid_height + 1 * grid_gap },
parentNode: 'profiteers',
},
{
id: 'heico',
type: 'node',
data: { label: 'HEICO' },
position: { x: 1 * grid_width + 1 * grid_gap, y: 1 * grid_height + 1 * grid_gap },
parentNode: 'profiteers',
},
{
id: 'blackrock',
type: 'node',
data: { label: 'Blackrock' },
position: { x: 0 * grid_width + 1 * grid_gap, y: 2 * grid_height + 1 * grid_gap },
parentNode: 'profiteers',
},
{
id: 'google',
type: 'node',
data: { label: 'Google' },
position: { x: 1 * grid_width + 1 * grid_gap, y: 3 * grid_height + 1 * grid_gap },
parentNode: 'profiteers',
},
{
id: 'microsoft',
type: 'node',
data: { label: 'Microsoft' },
position: { x: 1 * grid_width + 1 * grid_gap, y: 4 * grid_height + 1 * grid_gap },
parentNode: 'profiteers',
},
{
id: 'ajc',
type: 'node',
data: { label: 'AJC and other Zionist cultural orgs' },
position: { x: 0 * grid_width + 2 * grid_gap, y: 0 * grid_height + 2 * grid_gap },
className: 'light',
},
{
id: 'minouche',
type: 'node',
data: { label: 'Minouche Shafik + Upper Admin' },
position: { x: 2 * grid_width + 2 * grid_gap, y: 3 * grid_height + 2 * grid_gap },
// parentNode: 'trustees',
},
{
id: 'cu',
type: 'node',
data: { label: 'CU Investment Company' },
position: { x: 4 * grid_width + 2 * grid_gap, y: 3 * grid_height + 2 * grid_gap },
},
{
id: 'cssi',
type: 'node',
data: { label: 'CSSI, Rules of Conduct, etc.' },
position: { x: -0.5 * grid_width + 2 * grid_gap, y: 5 * grid_height + 2 * grid_gap },
},
{
id: 'publicSafety',
type: 'node',
data: { label: 'Public Safety' },
position: { x: 0.5 * grid_width + 2 * grid_gap, y: 5 * grid_height + 2 * grid_gap },
},
{
id: 'nypd',
type: 'node',
data: { label: 'NYPD' },
position: { x: 4 * grid_width + 2 * grid_gap, y: 5 * grid_height + 2 * grid_gap },
},
] satisfies Node<NodeData, string>[];
export const nodeTypes = {
node: SimpleNode,
group: GroupNode,
'position-logger': PositionLoggerNode,
} satisfies NodeTypes;