Skip to content

Commit 1c4c6f1

Browse files
author
Xing Han Lu
committed
Updated Event
1 parent ea77fe0 commit 1c4c6f1

File tree

1 file changed

+64
-42
lines changed

1 file changed

+64
-42
lines changed

usage-events.py

Lines changed: 64 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,19 @@
1212

1313
# Dictionary declaration
1414
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+
}
2028
]
2129

2230
# Object declaration
@@ -45,47 +53,61 @@
4553
'data': {'id': 'six', 'label': 'Node 6', 'parent': 'three'},
4654
'position': {'x': 150, 'y': 150}
4755
},
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+
},
7491
{'data': {
7592
'source': 'four',
7693
'target': 'four',
7794
'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+
},
89111
]
90112

91113
styles = {

0 commit comments

Comments
 (0)