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
2a31e454
Commit
2a31e454
authored
Oct 14, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] fix edge confluence filter
parent
37e3a1b0
Pipeline
#3276
failed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
Layout.purs
src/Gargantext/Components/GraphExplorer/Layout.purs
+3
-3
Resources.purs
src/Gargantext/Components/GraphExplorer/Resources.purs
+8
-2
Types.purs
src/Gargantext/Hooks/Sigmax/Types.purs
+7
-4
No files found.
src/Gargantext/Components/GraphExplorer/Layout.purs
View file @
2a31e454
...
...
@@ -268,9 +268,9 @@ graphViewCpt = R.memo' $ here.component "graphView" cpt where
, showEdges' }
-- R.useEffect' $ do
--
here.log2 "[graphView] selectedNodeIds'" $ A.fromFoldable selectedNodeIds'
--
let (SigmaxT.Graph { nodes: n }) = transformedGraph
-- here.log2 "[graphView]
transformedGraph nodes" $ A.fromFoldable n
--
let (SigmaxT.Graph { edges: e }) = transformedGraph
--
here.log2 "[graphView] transformedGraph edges" $ A.fromFoldable e
-- here.log2 "[graphView]
hidden edges" $ A.filter(_.hidden) $ A.fromFoldable e
-- | Render
-- |
...
...
src/Gargantext/Components/GraphExplorer/Resources.purs
View file @
2a31e454
...
...
@@ -60,6 +60,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
boxes <- AppStore.use
{ showEdges
, edgeConfluence
, edgeWeight
, graph
, graphStage
...
...
@@ -71,6 +72,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
} <- GraphStore.use
showEdges' <- R2.useLive' showEdges
edgeConfluence' <- R2.useLive' edgeConfluence
edgeWeight' <- R2.useLive' edgeWeight
graphStage' <- R2.useLive' graphStage
graph' <- R2.useLive' graph
...
...
@@ -133,7 +135,9 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
_ <- Sigma.bindMouseSelectorPlugin sigma
pure unit
Sigmax.setSigmaEdgesVisibility sig { edgeWeight: edgeWeight', showEdges: showEdges' }
Sigmax.setSigmaEdgesVisibility sig { edgeConfluence: edgeConfluence'
, edgeWeight: edgeWeight'
, showEdges: showEdges' }
-- here.log2 "[graph] startForceAtlas" startForceAtlas
if startForceAtlas' then
...
...
@@ -190,7 +194,9 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
-- Sigmax.updateNodes sigma tNodesMap
let edgesState = not $ SigmaxTypes.edgeStateHidden showEdges'
-- here.log2 "[graphCpt] edgesState" edgesState
Sigmax.setSigmaEdgesVisibility sigma { edgeWeight: edgeWeight', showEdges: showEdges' }
Sigmax.setSigmaEdgesVisibility sigma { edgeConfluence: edgeConfluence'
, edgeWeight: edgeWeight'
, showEdges: showEdges' }
_ -> pure unit
...
...
src/Gargantext/Hooks/Sigmax/Types.purs
View file @
2a31e454
...
...
@@ -270,10 +270,13 @@ defaultPalette = ["#5fa571","#ab9ba2","#da876d","#bdd3ff"
type EdgeVisibilityProps =
( edgeWeight :: Range.NumberRange
, showEdges :: ShowEdgesState )
( edgeConfluence :: Range.NumberRange
, edgeWeight :: Range.NumberRange
, showEdges :: ShowEdgesState )
setEdgeVisibility :: Record EdgeVisibilityProps -> Record Edge -> Record Edge
setEdgeVisibility { edge
Weight, showEdges } e@{
weight } = e { hidden = hidden }
setEdgeVisibility { edge
Confluence, edgeWeight, showEdges } e@{ confluence,
weight } = e { hidden = hidden }
where
hidden = (edgeStateHidden showEdges) || (not $ Range.within edgeWeight weight)
hidden = (edgeStateHidden showEdges)
|| (not $ Range.within edgeConfluence confluence)
|| (not $ Range.within edgeWeight weight)
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