fix: improve graph spacing, mobile layout, and Telegram viewport

- Increase FA2 scalingRatio to 10 and decrease gravity to 0.5 for
  better node spacing (less cluttered graph)
- Use 100dvh instead of 100vh for Telegram Mini App viewport compat
- Hide legend on mobile to prevent overlay collision
- Move controls to bottom-right on mobile, bottom-center on desktop
- Make stats single-column on mobile for compact layout
This commit is contained in:
Fringg
2026-03-19 08:20:38 +03:00
parent 0f756d633d
commit 818557f57d
3 changed files with 10 additions and 9 deletions

View File

@@ -236,9 +236,10 @@ export function NetworkGraph({ data, className }: NetworkGraphProps) {
if (graph.order > 0) {
const supervisor = new FA2LayoutSupervisor(graph, {
settings: {
gravity: 1,
scalingRatio: 2,
gravity: 0.5,
scalingRatio: 10,
barnesHutOptimize: true,
slowDown: 2,
},
});
fa2Ref.current = supervisor;