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
61a19df3
Commit
61a19df3
authored
Dec 04, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev-warnings-cleanup
parents
f794707a
5e03363b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
Graph.purs
src/Gargantext/Components/Graph.purs
+5
-5
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+2
-1
Types.purs
src/Gargantext/Components/GraphExplorer/Types.purs
+4
-2
No files found.
src/Gargantext/Components/Graph.purs
View file @
61a19df3
...
...
@@ -215,7 +215,7 @@ sigmaSettings =
, drawEdges: true
, drawLabels: true
, drawNodes: true
, enableEdgeHovering:
tru
e
, enableEdgeHovering:
fals
e
, edgeHoverExtremities: true
, edgeHoverColor: "edge"
, edgeHoverPrecision: 2.0
...
...
@@ -226,11 +226,11 @@ sigmaSettings =
, hideEdgesOnMove: true
, labelSize : "fixed"
, labelSizeRatio: 1.0 -- label size in ratio of node size
, labelThreshold:
1
.0 -- min node cam size to start showing label
, maxEdgeSize:
2
.0
, maxNodeSize:
10
.0
, labelThreshold:
5
.0 -- min node cam size to start showing label
, maxEdgeSize:
1
.0
, maxNodeSize:
7
.0
, minEdgeSize: 0.5 -- in fact used in tina as edge size
, minNodeSize:
5.0
, minNodeSize:
0.1
, mouseEnabled: true
, mouseZoomDuration: 150.0
, nodeBorderColor: "node" -- choices: 'default' color vs. node color
...
...
src/Gargantext/Components/GraphExplorer.purs
View file @
61a19df3
...
...
@@ -17,6 +17,7 @@ import DOM.Simple.Types (Element)
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as RH
import Math (log)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Sigmax (Sigma)
...
...
@@ -207,7 +208,7 @@ convert (GET.GraphData r) = Tuple r.metaData $ SigmaxTypes.Graph {nodes, edges}
nodeFn i (GET.Node n) =
Seq.singleton
{ id : n.id_
, size :
toNumber n.size
, size :
log (toNumber n.size + 1.0)
, label : n.label
, x : n.x -- cos (toNumber i)
, y : n.y -- sin (toNumber i)
...
...
src/Gargantext/Components/GraphExplorer/Types.purs
View file @
61a19df3
...
...
@@ -62,6 +62,7 @@ newtype MetaData = MetaData
, legend :: Array Legend
, corpusId :: Array Int
, listId :: ListId
, version :: Int
}
getLegend :: GraphData -> Maybe (Array Legend)
...
...
@@ -97,7 +98,7 @@ initialGraphData = GraphData {
nodes: []
, edges: []
, sides: []
, metaData : Just $ MetaData {title : "", legend : [], corpusId : [], listId : 0}
, metaData : Just $ MetaData {title : "", legend : [], corpusId : [], listId : 0
, version : 0
}
}
instance decodeJsonGraphData :: DecodeJson GraphData where
...
...
@@ -134,7 +135,8 @@ instance decodeJsonMetaData :: DecodeJson MetaData where
legend <- obj .: "legend"
corpusId <- obj .: "corpusId"
listId <- obj .: "listId"
pure $ MetaData { title, legend, corpusId, listId}
version <- obj .: "version"
pure $ MetaData { title, legend, corpusId, listId, version}
instance decodeJsonLegend :: DecodeJson Legend 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