Commit e6b0b8e2 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/689-dev-graph-legend-improvements' into dev

parents cb9a6dd5 1b8c9eca
...@@ -130,10 +130,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where ...@@ -130,10 +130,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where
legend' /\ legendBox <- R2.useBox' legend legend' /\ legendBox <- R2.useBox' legend
-- | Computed
-- |
let
maxItemPerCluster = 4
-- | Hooks -- | Hooks
-- | -- |
...@@ -144,7 +140,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where ...@@ -144,7 +140,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where
( getter _.id_ ( getter _.id_
>>> GEU.takeGreatestNodeByCluster >>> GEU.takeGreatestNodeByCluster
hyperdataGraph hyperdataGraph
maxItemPerCluster
) )
-- For each provided Cluster (see Legend), count the number of nodes -- For each provided Cluster (see Legend), count the number of nodes
......
...@@ -175,11 +175,6 @@ selectedNodesCpt = here.component "selectedNodes" cpt where ...@@ -175,11 +175,6 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
) )
# isJust # isJust
countValue
= extractedNodeList
# A.length
# (nodeCount - _)
-- | Behaviors -- | Behaviors
-- | -- |
let let
...@@ -212,7 +207,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where ...@@ -212,7 +207,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
] ]
, ,
R2.when (eq countValue 0) $ R2.when (eq nodeCount 0) $
H.li H.li
{ className: intercalate " " { className: intercalate " "
...@@ -221,10 +216,10 @@ selectedNodesCpt = here.component "selectedNodes" cpt where ...@@ -221,10 +216,10 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
] ]
} }
[ [
H.text "0 node" H.text "0 nodes"
] ]
, ,
R2.when (not $ eq countValue 0) $ R2.when (not $ eq nodeCount 0) $
H.li H.li
{ className: intercalate " " { className: intercalate " "
...@@ -233,14 +228,14 @@ selectedNodesCpt = here.component "selectedNodes" cpt where ...@@ -233,14 +228,14 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
] ]
} }
[ [
H.text "+" H.text "|"
, ,
H.text $ nbsp 1 H.text $ nbsp 1
, ,
H.text $ show countValue H.text $ show nodeCount
, ,
H.text $ nbsp 1 H.text $ nbsp 1
, ,
H.text $ eq countValue 1 ? "node" $ "nodes" H.text $ eq nodeCount 1 ? "node" $ "nodes"
] ]
] ]
...@@ -78,8 +78,8 @@ normalizeNodeSize minSize maxSize ns = over traversed (over sizeLens (\s -> minS ...@@ -78,8 +78,8 @@ normalizeNodeSize minSize maxSize ns = over traversed (over sizeLens (\s -> minS
------------------------------------------------------------------------ ------------------------------------------------------------------------
takeGreatestNodeByCluster :: GET.HyperdataGraph -> Int -> Int -> Array GEGT.Node takeGreatestNodeByCluster :: GET.HyperdataGraph -> Int -> Array GEGT.Node
takeGreatestNodeByCluster graphData take clusterId takeGreatestNodeByCluster graphData clusterId
= graphData = graphData
# getter _.graph # getter _.graph
>>> getter _.nodes >>> getter _.nodes
...@@ -91,7 +91,6 @@ takeGreatestNodeByCluster graphData take clusterId ...@@ -91,7 +91,6 @@ takeGreatestNodeByCluster graphData take clusterId
>>> A.sortWith >>> A.sortWith
( getter _.size ( getter _.size
) )
>>> A.takeEnd take
>>> A.reverse >>> A.reverse
countNodeByCluster :: GET.HyperdataGraph -> Int -> GEGT.ClusterCount countNodeByCluster :: GET.HyperdataGraph -> Int -> GEGT.ClusterCount
......
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