Skip to content

Commit

Permalink
Update curve demo network
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekucera committed Dec 12, 2024
1 parent ec51d4d commit 129116d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
18 changes: 16 additions & 2 deletions debug/webgl/network-curve.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
"elements": {
"nodes": [
{ "data": { "id": "n1", "weight": 1 }, "position": { "x": 0, "y": 0 } },
{ "data": { "id": "n2", "weight": 2 }, "position": { "x": 0, "y": 100 } }
{ "data": { "id": "n2", "weight": 2 }, "position": { "x": 0, "y": 150 } },
{ "data": { "id": "n3", "weight": 3 }, "position": { "x": 150, "y": -25 } }
],
"edges": [
{ "data": { "id":"n1-n2-0", "source": "n1", "target": "n2", "directed": "false" } },
{ "data": { "id":"n1-n2-1", "source": "n1", "target": "n2", "directed": "false" } },
{ "data": { "id":"n1-n2-2", "source": "n1", "target": "n2", "directed": "false" } },
{ "data": { "id":"n1-n2-3", "source": "n1", "target": "n2", "directed": "false" } },
{ "data": { "id":"self-0", "source": "n1", "target": "n1", "directed": "false" } },
{ "data": { "id":"self-1", "source": "n1", "target": "n1", "directed": "false" } }
{ "data": { "id":"self-1", "source": "n1", "target": "n1", "directed": "false" } },
{ "data": { "id":"n1-n3", "source": "n1", "target": "n3", "directed": "false" } }
]
},
"style": [
Expand Down Expand Up @@ -40,6 +42,18 @@
"opacity": 0.5,
"curve-style": "bezier"
}
}, {
"selector": "#n1-n3",
"style": {
"curve-style": "unbundled-bezier",
"control-point-distances": [40, -40],
"control-point-weights": [0.250, 0.75],
"source-arrow-shape": "triangle",
"source-arrow-color": "green",
"target-arrow-shape": "triangle",
"target-arrow-color": "green",
"width": 3
}
}
]
}
6 changes: 3 additions & 3 deletions debug/webgl/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ var networks = {
'style_test': {
desc: 'Style Test',
nodes: 5,
edges: 10,
edges: 13,
url: 'network-styles.json',
layout: { name: 'preset' }
},
'curve_test': {
desc: 'Curve Test',
nodes: 2,
edges: 1,
nodes: 3,
edges: 7,
url: 'network-curve.json',
layout: { name: 'preset' }
},
Expand Down

0 comments on commit 129116d

Please sign in to comment.