Commit f1cff044 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[GraphExplorer] fix camera so that graph is centered

parent b1bb7a1c
......@@ -153,7 +153,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
-- Default camera: slightly de-zoom the graph to avoid
-- nodes sticking to the container borders
Nothing ->
Sigma.updateCamera sig { ratio: 1.1, x: 0.0, y: 0.0 }
Sigma.updateCamera sig { ratio: 1.1, x: 0.5, y: 0.5 }
-- Reload Sigma on Theme changes
-- TODO
......
......@@ -51,7 +51,7 @@ instance JSON.ReadForeign Node where
Record.rename idP id_P $
Record.rename typeP type_P $
Record.rename x_coordP xP $
Record.rename y_coordP yP inst
Record.rename y_coordP yP $ inst
instance JSON.WriteForeign Node where
writeImpl (Node nd) = JSON.writeImpl $
Record.rename id_P idP $
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment