diff --git a/script.js b/script.js index 4280bb3..4944d19 100644 --- a/script.js +++ b/script.js @@ -1,5 +1,5 @@ import graphology from 'https://cdn.jsdelivr.net/npm/graphology/+esm'; -import sigma from 'https://cdn.jsdelivr.net/npm/sigma/+esm'; +import Sigma from 'https://cdn.jsdelivr.net/npm/sigma/+esm'; import forceAtlas2 from 'https://cdn.jsdelivr.net/npm/graphology-layout-forceatlas2/+esm'; document.addEventListener('DOMContentLoaded', function() { @@ -13,10 +13,7 @@ async function main(){ graph = addLayout(graph); console.log("Graph data:", network_graph_json); console.log("Graph object:", graph); - let sigmaInstance = new sigma.Sigma( - graph, - document.getElementById('container') - ); + new Sigma(graph, document.getElementById('container')); } catch (error) { console.error('Failed to load or create the graph:', error); } @@ -58,7 +55,7 @@ function addLayout(graph){ iterations: 100, settings: { gravity: 0.5, - scalingRatio: 2.0 + scalingRatio: 1.0 } }); diff --git a/styles.css b/styles.css index 8740bf6..2681f62 100644 --- a/styles.css +++ b/styles.css @@ -1,9 +1,12 @@ -body { +html, body { + height: 100%; + margin: 0; + padding: 0; background: lightgrey; } #container { - height: auto; - width: auto; + width: 100vw; + height: 100vh; background: white; } \ No newline at end of file