Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
694a2d1e
Commit
694a2d1e
authored
Aug 21, 2024
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph explorer] Select nodes by clicking on the legend color
parent
5807c509
Pipeline
#6513
passed with stages
in 24 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Legend.purs
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
+8
-1
No files found.
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
View file @
694a2d1e
...
...
@@ -4,6 +4,7 @@ module Gargantext.Components.GraphExplorer.Sidebar.Legend
import Prelude hiding (map)
import Control.Applicative (map)
import Data.Array (fromFoldable)
import Data.Array as A
import Data.Maybe (isJust, maybe)
...
...
@@ -63,9 +64,10 @@ legendCpt = here.component "legend" cpt where
H.li
{ className: "graph-legend__item" }
[
H.
div
H.
button
{ className: "graph-legend__code"
, style: { backgroundColor: GET.intColor id_ }
, on: { click: \_ -> selectNodes id_}
}
[]
,
...
...
@@ -91,6 +93,11 @@ legendCpt = here.component "legend" cpt where
_ <- updateLegend { legend: (fromFoldable newLegendSeq), graphId, session }
pure unit
selectNodes :: Int -> Effect Unit
selectNodes id = do
let nodes = filterByCluster id extractedNodeList
T.write_ (Set.fromFoldable $ map (\(GEGT.Node { id_ }) -> id_) nodes) selectedNodeIds
filterByCluster :: Int -> Array GEGT.Node -> Array GEGT.Node
filterByCluster id
= A.filter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment