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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
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
Changes
3
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
...
@@ -268,9 +268,9 @@ graphViewCpt = R.memo' $ here.component "graphView" cpt where
, showEdges' }
, showEdges' }
-- R.useEffect' $ do
-- R.useEffect' $ do
--
here.log2 "[graphView] selectedNodeIds'" $ A.fromFoldable selectedNodeIds'
--
let (SigmaxT.Graph { edges: e }) = transformedGraph
--
let (SigmaxT.Graph { nodes: n }) = transformedGraph
--
here.log2 "[graphView] transformedGraph edges" $ A.fromFoldable e
-- here.log2 "[graphView]
transformedGraph nodes" $ A.fromFoldable n
-- here.log2 "[graphView]
hidden edges" $ A.filter(_.hidden) $ A.fromFoldable e
-- | Render
-- | Render
-- |
-- |
...
...
src/Gargantext/Components/GraphExplorer/Resources.purs
View file @
2a31e454
...
@@ -60,6 +60,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
...
@@ -60,6 +60,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
boxes <- AppStore.use
boxes <- AppStore.use
{ showEdges
{ showEdges
, edgeConfluence
, edgeWeight
, edgeWeight
, graph
, graph
, graphStage
, graphStage
...
@@ -71,6 +72,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
...
@@ -71,6 +72,7 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
} <- GraphStore.use
} <- GraphStore.use
showEdges' <- R2.useLive' showEdges
showEdges' <- R2.useLive' showEdges
edgeConfluence' <- R2.useLive' edgeConfluence
edgeWeight' <- R2.useLive' edgeWeight
edgeWeight' <- R2.useLive' edgeWeight
graphStage' <- R2.useLive' graphStage
graphStage' <- R2.useLive' graphStage
graph' <- R2.useLive' graph
graph' <- R2.useLive' graph
...
@@ -133,7 +135,9 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
...
@@ -133,7 +135,9 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
_ <- Sigma.bindMouseSelectorPlugin sigma
_ <- Sigma.bindMouseSelectorPlugin sigma
pure unit
pure unit
Sigmax.setSigmaEdgesVisibility sig { edgeWeight: edgeWeight', showEdges: showEdges' }
Sigmax.setSigmaEdgesVisibility sig { edgeConfluence: edgeConfluence'
, edgeWeight: edgeWeight'
, showEdges: showEdges' }
-- here.log2 "[graph] startForceAtlas" startForceAtlas
-- here.log2 "[graph] startForceAtlas" startForceAtlas
if startForceAtlas' then
if startForceAtlas' then
...
@@ -190,7 +194,9 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
...
@@ -190,7 +194,9 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
-- 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.setSigmaEdgesVisibility sigma { edgeWeight: edgeWeight', showEdges: showEdges' }
Sigmax.setSigmaEdgesVisibility sigma { edgeConfluence: edgeConfluence'
, edgeWeight: edgeWeight'
, showEdges: showEdges' }
_ -> pure unit
_ -> pure unit
...
...
src/Gargantext/Hooks/Sigmax/Types.purs
View file @
2a31e454
...
@@ -270,10 +270,13 @@ defaultPalette = ["#5fa571","#ab9ba2","#da876d","#bdd3ff"
...
@@ -270,10 +270,13 @@ defaultPalette = ["#5fa571","#ab9ba2","#da876d","#bdd3ff"
type EdgeVisibilityProps =
type EdgeVisibilityProps =
( edgeWeight :: Range.NumberRange
( edgeConfluence :: Range.NumberRange
, showEdges :: ShowEdgesState )
, edgeWeight :: Range.NumberRange
, showEdges :: ShowEdgesState )
setEdgeVisibility :: Record EdgeVisibilityProps -> Record Edge -> Record Edge
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
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