diff --git a/frontend/src/components/Flow/BrainView.tsx b/frontend/src/components/Flow/BrainView.tsx index 7af7b6f..31c61c0 100644 --- a/frontend/src/components/Flow/BrainView.tsx +++ b/frontend/src/components/Flow/BrainView.tsx @@ -124,9 +124,14 @@ function build(graph: BrainGraph): { nodes: Node[]; edges: Edge[] } { id: node.id, type: "brain", // React Flow places by the top-left corner; the layout means centres. + // Rounded, because the force simulation settles on arbitrary floats and + // a neuron on a half pixel has its ring, its gap and its disc rounded + // one edge at a time — which on the smallest ones is a visibly + // off-centre ring. `size` is already whole, so this is the last + // fractional term. position: { - x: (node.x ?? 0) - node.size / 2, - y: (node.y ?? 0) - node.size / 2, + x: Math.round((node.x ?? 0) - node.size / 2), + y: Math.round((node.y ?? 0) - node.size / 2), }, data: { label: source.label,