ruv commited on
Commit
074d4cd
·
verified ·
1 Parent(s): 58c1cf6

Create initial-elements.js

Browse files
Files changed (1) hide show
  1. src/initial-elements.js +116 -0
src/initial-elements.js ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { MarkerType, Position } from 'reactflow';
3
+
4
+ export const nodes = [
5
+ {
6
+ id: '1',
7
+ type: 'input',
8
+ data: {
9
+ label: 'Input Node',
10
+ },
11
+ position: { x: 250, y: 0 },
12
+ },
13
+ {
14
+ id: '2',
15
+ data: {
16
+ label: 'Default Node',
17
+ },
18
+ position: { x: 100, y: 100 },
19
+ },
20
+ {
21
+ id: '3',
22
+ type: 'output',
23
+ data: {
24
+ label: 'Output Node',
25
+ },
26
+ position: { x: 400, y: 100 },
27
+ },
28
+ {
29
+ id: '4',
30
+ type: 'custom',
31
+ position: { x: 100, y: 200 },
32
+ data: {
33
+ selects: {
34
+ 'handle-0': 'smoothstep',
35
+ 'handle-1': 'smoothstep',
36
+ },
37
+ },
38
+ },
39
+ {
40
+ id: '5',
41
+ type: 'output',
42
+ data: {
43
+ label: 'custom style',
44
+ },
45
+ className: 'circle',
46
+ style: {
47
+ background: '#2B6CB0',
48
+ color: 'white',
49
+ },
50
+ position: { x: 400, y: 200 },
51
+ sourcePosition: Position.Right,
52
+ targetPosition: Position.Left,
53
+ },
54
+ {
55
+ id: '6',
56
+ type: 'output',
57
+ style: {
58
+ background: '#63B3ED',
59
+ color: 'white',
60
+ width: 100,
61
+ },
62
+ data: {
63
+ label: 'Node',
64
+ },
65
+ position: { x: 400, y: 325 },
66
+ sourcePosition: Position.Right,
67
+ targetPosition: Position.Left,
68
+ },
69
+ {
70
+ id: '7',
71
+ type: 'default',
72
+ className: 'annotation',
73
+ data: {
74
+ label: (
75
+ <>
76
+ On the bottom left you see the <strong>Controls</strong> and the bottom right the{' '}
77
+ <strong>MiniMap</strong>. This is also just a node 🥳
78
+ </>
79
+ ),
80
+ },
81
+ draggable: false,
82
+ selectable: false,
83
+ position: { x: 150, y: 400 },
84
+ },
85
+ ];
86
+
87
+ export const edges = [
88
+ { id: 'e1-2', source: '1', target: '2', label: 'this is an edge label' },
89
+ { id: 'e1-3', source: '1', target: '3', animated: true },
90
+ {
91
+ id: 'e4-5',
92
+ source: '4',
93
+ target: '5',
94
+ type: 'smoothstep',
95
+ sourceHandle: 'handle-0',
96
+ data: {
97
+ selectIndex: 0,
98
+ },
99
+ markerEnd: {
100
+ type: MarkerType.ArrowClosed,
101
+ },
102
+ },
103
+ {
104
+ id: 'e4-6',
105
+ source: '4',
106
+ target: '6',
107
+ type: 'smoothstep',
108
+ sourceHandle: 'handle-1',
109
+ data: {
110
+ selectIndex: 1,
111
+ },
112
+ markerEnd: {
113
+ type: MarkerType.ArrowClosed,
114
+ },
115
+ },
116
+ ];