|
12 | 12 |
|
13 | 13 | # Dictionary declaration |
14 | 14 | elements_dict = [ |
15 | | - {'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 50, 'y': 50}}, |
16 | | - {'data': {'id': 'two', 'label': 'Node 2'}, |
17 | | - 'position': {'x': 200, 'y': 200}}, |
18 | | - {'data': {'source': 'one', 'target': 'two', |
19 | | - 'label': 'Edge from Node1 to Node2'}} |
| 15 | + { |
| 16 | + 'data': {'id': 'one', 'label': 'Node 1'}, |
| 17 | + 'position': {'x': 50, 'y': 50} |
| 18 | + }, |
| 19 | + { |
| 20 | + 'data': {'id': 'two', 'label': 'Node 2'}, |
| 21 | + 'position': {'x': 200, 'y': 200}}, |
| 22 | + { |
| 23 | + 'data': { |
| 24 | + 'source': 'one', 'target': 'two', |
| 25 | + 'label': 'Edge from Node1 to Node2' |
| 26 | + } |
| 27 | + } |
20 | 28 | ] |
21 | 29 |
|
22 | 30 | # Object declaration |
|
45 | 53 | 'data': {'id': 'six', 'label': 'Node 6', 'parent': 'three'}, |
46 | 54 | 'position': {'x': 150, 'y': 150} |
47 | 55 | }, |
48 | | - |
49 | | - {'data': { |
50 | | - 'source': 'one', |
51 | | - 'target': 'two', |
52 | | - 'label': 'Edge from Node1 to Node2' |
53 | | - }}, |
54 | | - {'data': { |
55 | | - 'source': 'one', |
56 | | - 'target': 'five', |
57 | | - 'label': 'Edge from Node 1 to Node 5' |
58 | | - }}, |
59 | | - {'data': { |
60 | | - 'source': 'two', |
61 | | - 'target': 'four', |
62 | | - 'label': 'Edge from Node 2 to Node 4' |
63 | | - }}, |
64 | | - {'data': { |
65 | | - 'source': 'three', |
66 | | - 'target': 'five', |
67 | | - 'label': 'Edge from Node 3 to Node 5' |
68 | | - }}, |
69 | | - {'data': { |
70 | | - 'source': 'three', |
71 | | - 'target': 'two', |
72 | | - 'label': 'Edge from Node 3 to Node 2' |
73 | | - }}, |
| 56 | + { |
| 57 | + 'data': { |
| 58 | + 'source': 'one', |
| 59 | + 'target': 'two', |
| 60 | + 'label': 'Edge from Node1 to Node2' |
| 61 | + } |
| 62 | + }, |
| 63 | + { |
| 64 | + 'data': { |
| 65 | + 'source': 'one', |
| 66 | + 'target': 'five', |
| 67 | + 'label': 'Edge from Node 1 to Node 5' |
| 68 | + } |
| 69 | + }, |
| 70 | + { |
| 71 | + 'data': { |
| 72 | + 'source': 'two', |
| 73 | + 'target': 'four', |
| 74 | + 'label': 'Edge from Node 2 to Node 4' |
| 75 | + } |
| 76 | + }, |
| 77 | + { |
| 78 | + 'data': { |
| 79 | + 'source': 'three', |
| 80 | + 'target': 'five', |
| 81 | + 'label': 'Edge from Node 3 to Node 5' |
| 82 | + } |
| 83 | + }, |
| 84 | + { |
| 85 | + 'data': { |
| 86 | + 'source': 'three', |
| 87 | + 'target': 'two', |
| 88 | + 'label': 'Edge from Node 3 to Node 2' |
| 89 | + } |
| 90 | + }, |
74 | 91 | {'data': { |
75 | 92 | 'source': 'four', |
76 | 93 | 'target': 'four', |
77 | 94 | 'label': 'Edge from Node 4 to Node 4' |
78 | | - }}, |
79 | | - {'data': { |
80 | | - 'source': 'four', |
81 | | - 'target': 'six', |
82 | | - 'label': 'Edge from Node 4 to Node 6' |
83 | | - }}, |
84 | | - {'data': { |
85 | | - 'source': 'five', |
86 | | - 'target': 'one', |
87 | | - 'label': 'Edge from Node 5 to Node 1' |
88 | | - }}, |
| 95 | + } |
| 96 | + }, |
| 97 | + { |
| 98 | + 'data': { |
| 99 | + 'source': 'four', |
| 100 | + 'target': 'six', |
| 101 | + 'label': 'Edge from Node 4 to Node 6' |
| 102 | + } |
| 103 | + }, |
| 104 | + { |
| 105 | + 'data': { |
| 106 | + 'source': 'five', |
| 107 | + 'target': 'one', |
| 108 | + 'label': 'Edge from Node 5 to Node 1' |
| 109 | + } |
| 110 | + }, |
89 | 111 | ] |
90 | 112 |
|
91 | 113 | styles = { |
|
0 commit comments