gioser-web: replace Rust SVG graph with Cytoscape.js

- Add cytoscape-graph.js: fetches /graph, renders with Cytoscape.js
- Style: round-rect nodes, cose layout, edge width proportional to weight
- Click: center node + fade rest (wineandcheesemap effect)
- Double-click: trigger navigation callback
- Hover: tooltip with preview text
- Click background: restore all
- Remove gioser-graph-web crate dependency (no longer needed)
- Add CDN cytoscape@3.30.4 + defer script to index.html
- gioser-graph custom element auto-initialized on mount
This commit is contained in:
Sergio
2026-05-23 15:17:28 +00:00
parent 529287f01d
commit d4c31d70b7
10 changed files with 853 additions and 548 deletions
+6
View File
@@ -99,6 +99,9 @@
</a>
</nav>
<!-- Cytoscape.js para el grafo semántico -->
<script src="https://cdn.jsdelivr.net/npm/cytoscape@3.30.4/dist/cytoscape.min.js"></script>
<script type="module">
import init from "./pkg/gioser_web.js";
init().catch(err => {
@@ -108,5 +111,8 @@
String(err) + '</pre>');
});
</script>
<!-- Grafo semántico (Cytoscape) — se auto-inicializa en <gioser-graph> -->
<script src="./cytoscape-graph.js" defer></script>
</body>
</html>