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
07ad2aa1
Commit
07ad2aa1
authored
Dec 24, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] fix Louvain edge colouring
parent
33609eac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Graph.purs
src/Gargantext/Components/Graph.purs
+0
-2
Types.purs
src/Gargantext/Hooks/Sigmax/Types.purs
+11
-1
No files found.
src/Gargantext/Components/Graph.purs
View file @
07ad2aa1
...
@@ -9,7 +9,6 @@ import Prelude (bind, const, discard, not, pure, unit, ($))
...
@@ -9,7 +9,6 @@ import Prelude (bind, const, discard, not, pure, unit, ($))
import Data.Either (Either(..))
import Data.Either (Either(..))
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Nullable (Nullable)
import Data.Nullable (Nullable)
import Data.Sequence as Seq
import Data.Tuple.Nested ((/\))
import Data.Tuple.Nested ((/\))
import DOM.Simple.Console (log, log2)
import DOM.Simple.Console (log, log2)
import DOM.Simple.Types (Element)
import DOM.Simple.Types (Element)
...
@@ -17,7 +16,6 @@ import FFI.Simple (delay)
...
@@ -17,7 +16,6 @@ import FFI.Simple (delay)
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML as RH
import Reactix.DOM.HTML as RH
import Gargantext.Data.Louvain as Louvain
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Sigma as Sigma
...
...
src/Gargantext/Hooks/Sigmax/Types.purs
View file @
07ad2aa1
...
@@ -173,7 +173,17 @@ louvainGraph g cluster = Graph {nodes: newNodes, edges: newEdges}
...
@@ -173,7 +173,17 @@ louvainGraph g cluster = Graph {nodes: newNodes, edges: newEdges}
edges = graphEdges g
edges = graphEdges g
newNodes = (nodeClusterColor cluster) <$> nodes
newNodes = (nodeClusterColor cluster) <$> nodes
newEdges = edges
nm = nodesMap newNodes
newEdges = (edgeClusterColor cluster nm) <$> edges
edgeClusterColor cluster nm e = e { color = sourceNode.color, sourceNode = sourceNode, targetNode = targetNode }
where
sourceNode = case Map.lookup e.source nm of
Just sn -> sn
Nothing -> e.sourceNode
targetNode = case Map.lookup e.target nm of
Just tn -> tn
Nothing -> e.targetNode
nodeClusterColor cluster n = n { color = newColor }
nodeClusterColor cluster n = n { color = newColor }
where
where
...
...
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