From 129116db1d880ac33b887e7948e35944932299d8 Mon Sep 17 00:00:00 2001 From: Mike Kucera Date: Thu, 12 Dec 2024 09:19:21 -0500 Subject: [PATCH] Update curve demo network --- debug/webgl/network-curve.json | 18 ++++++++++++++++-- debug/webgl/networks.js | 6 +++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/debug/webgl/network-curve.json b/debug/webgl/network-curve.json index 8bf8957b1..59defa736 100644 --- a/debug/webgl/network-curve.json +++ b/debug/webgl/network-curve.json @@ -2,7 +2,8 @@ "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" } }, @@ -10,7 +11,8 @@ { "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": [ @@ -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 + } } ] } \ No newline at end of file diff --git a/debug/webgl/networks.js b/debug/webgl/networks.js index 43effaf82..263201978 100644 --- a/debug/webgl/networks.js +++ b/debug/webgl/networks.js @@ -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' } },