Commit 9bc014df authored by arturo's avatar arturo

[graph] Edges update

* #375: rc7.x
parent 8377dbf5
Pipeline #2772 failed with stage
in 0 seconds
...@@ -66,7 +66,6 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where ...@@ -66,7 +66,6 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
graph' <- R2.useLive' graph graph' <- R2.useLive' graph
startForceAtlas' <- R2.useLive' startForceAtlas startForceAtlas' <- R2.useLive' startForceAtlas
hyperdataGraph' <- R2.useLive' hyperdataGraph hyperdataGraph' <- R2.useLive' hyperdataGraph
selectedNodeIds' <- R2.useLive' selectedNodeIds
-- | Hooks -- | Hooks
-- | -- |
...@@ -143,9 +142,12 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where ...@@ -143,9 +142,12 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
_ -> pure unit _ -> pure unit
-- Stage ready -- Stage ready
-- (?) Probably this can be optimized to re-mark selected nodes only when --
-- they changed → done on #375 -- @TODO Probably this can be optimized to re-mark selected nodes only when
R.useEffect1' selectedNodeIds' case graphStage' of -- they changed → one solution could be to list every effects subject
-- to a graph transformation (eg. "showLouvain", "edgeConfluence",
-- etc) // drawback: don't forget to modify the effect white-list
R.useEffect' case graphStage' of
GET.Ready -> do GET.Ready -> do
let tEdgesMap = SigmaxTypes.edgesGraphMap transformedGraph let tEdgesMap = SigmaxTypes.edgesGraphMap transformedGraph
...@@ -156,7 +158,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where ...@@ -156,7 +158,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
Sigmax.updateEdges sigma tEdgesMap Sigmax.updateEdges sigma tEdgesMap
Sigmax.updateNodes sigma tNodesMap Sigmax.updateNodes sigma tNodesMap
let edgesState = not $ SigmaxTypes.edgeStateHidden showEdges' let edgesState = not $ SigmaxTypes.edgeStateHidden showEdges'
here.log2 "[graphCpt] edgesState" edgesState -- here.log2 "[graphCpt] edgesState" edgesState
Sigmax.setEdges sigma edgesState Sigmax.setEdges sigma edgesState
_ -> pure unit _ -> pure unit
......
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