[graph] rendering of graph snapshot works now

parent b6af6fe8
...@@ -154,19 +154,20 @@ drawGraphCpt = here.component "drawGraph" cpt where ...@@ -154,19 +154,20 @@ drawGraphCpt = here.component "drawGraph" cpt where
, showEdges: showEdges' } , showEdges: showEdges' }
-- here.log2 "[graph] startForceAtlas" startForceAtlas -- here.log2 "[graph] startForceAtlas" startForceAtlas
if startForceAtlas' then
case R.readRef fa2Ref of case R.readRef fa2Ref of
Nothing -> do Nothing -> do
fa2 <- ForceAtlas2.init (Sigma.graph sig) fa2Settings fa2 <- ForceAtlas2.init (Sigma.graph sig) fa2Settings
ForceAtlas2.start fa2
R.setRef fa2Ref (Just fa2) R.setRef fa2Ref (Just fa2)
Just _fa2 -> do if startForceAtlas' then do
ForceAtlas2.start fa2
else do
pure unit
Just fa2 -> do
-- TODO Kill and restart? Maybe check fa2.graph first? Should be equal to sigma.graph -- TODO Kill and restart? Maybe check fa2.graph first? Should be equal to sigma.graph
if startForceAtlas' then
pure unit pure unit
else else
case R.readRef fa2Ref of ForceAtlas2.stop fa2
Nothing -> pure unit
Just fa2 -> ForceAtlas2.stop fa2
case R.readRef noverlapRef of case R.readRef noverlapRef of
Nothing -> do Nothing -> do
...@@ -228,6 +229,8 @@ drawGraphCpt = here.component "drawGraph" cpt where ...@@ -228,6 +229,8 @@ drawGraphCpt = here.component "drawGraph" cpt where
case Tuple forceAtlasState' graphStage' of case Tuple forceAtlasState' graphStage' of
--Tuple SigmaxTypes.InitialLoading GET.Ready -> updateGraph --Tuple SigmaxTypes.InitialLoading GET.Ready -> updateGraph
-- forceatlas can be stopped initially for eg graph snapshots
Tuple SigmaxTypes.InitialStopped GET.Ready -> updateGraph
Tuple SigmaxTypes.InitialRunning GET.Ready -> updateGraph Tuple SigmaxTypes.InitialRunning GET.Ready -> updateGraph
Tuple SigmaxTypes.Paused GET.Ready -> updateGraph Tuple SigmaxTypes.Paused GET.Ready -> updateGraph
......
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