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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user