@fusion.dev/helix-graph 0.130.0 → 0.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,8 +67,9 @@ export const connectGraph = (frame, driver, options = {}) => {
67
67
  driver.look(current);
68
68
  if (driver.groups) {
69
69
  const members = new Map();
70
+ const shown = graph.shown;
70
71
  for (const node of nodes) {
71
- if (node.group !== undefined) {
72
+ if (node.group !== undefined && (!shown || shown.has(node.id))) {
72
73
  const list = members.get(node.group);
73
74
  if (list) {
74
75
  list.push(node.id);
@@ -214,7 +215,11 @@ export const connectGraph = (frame, driver, options = {}) => {
214
215
  };
215
216
  const handleSignal = (event) => {
216
217
  const { from, to, tone } = event.detail;
217
- if (!driver.signal || !drawnNodes.has(from) || !drawnNodes.has(to)) {
218
+ const shown = graph.shown;
219
+ if (!driver.signal ||
220
+ !drawnNodes.has(from) ||
221
+ !drawnNodes.has(to) ||
222
+ (shown && !(shown.has(from) && shown.has(to)))) {
218
223
  return;
219
224
  }
220
225
  colors ??= graphColorsFrom(frame);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-graph",
3
3
  "description": "Connects the Helix Graph frame to a graph renderer: Sigma.js, cosmos.gl, three.js, or a driver of your own.",
4
- "version": "0.130.0",
4
+ "version": "0.131.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -51,12 +51,12 @@
51
51
  },
52
52
  "bugs": "https://github.com/project-fusion/fusion/issues",
53
53
  "dependencies": {
54
- "@fusion.dev/helix-core": "0.130.0"
54
+ "@fusion.dev/helix-core": "0.131.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@cosmos.gl/graph": "^3.4.2",
58
- "@fusion.dev/helix-headless": "0.130.0",
59
- "@fusion.dev/helix-testing": "0.130.0",
58
+ "@fusion.dev/helix-headless": "0.131.0",
59
+ "@fusion.dev/helix-testing": "0.131.0",
60
60
  "@types/bun": "^1.3.0",
61
61
  "@types/three": "^0.186.0",
62
62
  "d3-force-3d": "^3.0.6",