@fusion.dev/helix-graph 0.223.0 → 0.223.1
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,12 @@ export const sigmaDriver = (sigma, options = {}) => {
|
|
|
67
67
|
const container = sigma.getContainer();
|
|
68
68
|
const camera = sigma.getCamera();
|
|
69
69
|
const before = new Map(SETTINGS.map((name) => [name, sigma.getSetting(name)]));
|
|
70
|
+
const boxed = () => container.isConnected && container.offsetWidth > 0 && container.offsetHeight > 0;
|
|
70
71
|
const sized = typeof ResizeObserver === 'function'
|
|
71
72
|
? new ResizeObserver(() => {
|
|
73
|
+
if (!boxed()) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
72
76
|
sigma.resize(true);
|
|
73
77
|
sigma.refresh();
|
|
74
78
|
})
|
|
@@ -323,6 +327,7 @@ export const sigmaDriver = (sigma, options = {}) => {
|
|
|
323
327
|
signals.signal(from, to, colors, animate);
|
|
324
328
|
},
|
|
325
329
|
stop: () => {
|
|
330
|
+
sized?.disconnect();
|
|
326
331
|
sigma.off('afterRender', redraw);
|
|
327
332
|
camera.off('updated', rezoomed);
|
|
328
333
|
names.stop();
|
|
@@ -337,9 +342,10 @@ export const sigmaDriver = (sigma, options = {}) => {
|
|
|
337
342
|
for (const [name, value] of before) {
|
|
338
343
|
sigma.setSetting(name, value !== false);
|
|
339
344
|
}
|
|
340
|
-
sized?.disconnect();
|
|
341
345
|
held.stop();
|
|
342
|
-
|
|
346
|
+
if (boxed()) {
|
|
347
|
+
sigma.refresh();
|
|
348
|
+
}
|
|
343
349
|
},
|
|
344
350
|
update: (changes, animate) => {
|
|
345
351
|
for (const id of changes.removeNodes) {
|
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.223.
|
|
4
|
+
"version": "0.223.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
},
|
|
61
61
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@fusion.dev/helix-core": "0.223.
|
|
63
|
+
"@fusion.dev/helix-core": "0.223.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@cosmos.gl/graph": "^3.5.1",
|
|
67
|
-
"@fusion.dev/helix-headless": "0.223.
|
|
68
|
-
"@fusion.dev/helix-testing": "0.223.
|
|
67
|
+
"@fusion.dev/helix-headless": "0.223.1",
|
|
68
|
+
"@fusion.dev/helix-testing": "0.223.1",
|
|
69
69
|
"@luma.gl/core": "~9.3.6",
|
|
70
70
|
"@luma.gl/engine": "~9.3.6",
|
|
71
71
|
"@luma.gl/shadertools": "~9.3.6",
|