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
98794386
Commit
98794386
authored
Apr 23, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DESIGN/ERGO] Graph explorer.
parent
554abebd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
31 deletions
+34
-31
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+34
-31
No files found.
src/Gargantext/Pages/Corpus/Graph.purs
View file @
98794386
...
...
@@ -299,7 +299,7 @@ mySettings = sigmaSettings { verbose : true
, mouseEnabled: true
, touchEnabled: true
, animationsTime:
1500.0
, animationsTime:
(5500.0)
, defaultNodeColor: "#ddd"
, twNodeRendBorderSize: 0.5 -- node borders (only iff ourRendering)
...
...
@@ -310,8 +310,8 @@ mySettings = sigmaSettings { verbose : true
, maxEdgeSize: 0.0
--, defaultEdgeType: "curve" -- 'curve' or 'line' (curve only iff ourRendering)
, twEdgeDefaultOpacity: 0.4 -- initial opacity added to src/tgt colors
, minNodeSize:
1
.0
, maxNodeSize:
1
0.0
, minNodeSize:
5
.0
, maxNodeSize:
3
0.0
--
-- -- labels
, font: "Droid Sans" -- font params
...
...
@@ -402,7 +402,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
where
treespec = over _render \frender d p (State s) c ->
[ div [ className "col-md-1", _id "graph-tree", style {marginTop:
"151
px"}] $
[ div [ className "col-md-1", _id "graph-tree", style {marginTop:
"65
px"}] $
[
button [className "btn btn-primary" , onClick \_ -> d ToggleTree]
[text $ if s.showTree then "Hide Tree" else "Show Tree"]
...
...
@@ -423,11 +423,13 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
simpleSpec defaultPerformAction defaultRender
Just treeId ->
(cmapProps (const {root: treeId}) (noState Tree.treeview))
render' :: Render State {} Action
render' d _ (State st@{settings, graphData: GraphData {sides,metaData }}) _ =
[ div [className "container-fluid", style {"padding-top" : "
100px"
}]
[ div [ className "row"]
[ h2 [ style {textAlign : "center", position : "relative", top: "-
38
px"}]
[ div [className "container-fluid", style {"padding-top" : "
90px"
}]
[
{-
div [ className "row"]
[ h2 [ style {textAlign : "center", position : "relative", top: "-
1
px"}]
[-- : MetaData {title}
case metaData of
Just( MetaData {title }) ->
...
...
@@ -436,7 +438,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
text "Title"
]
]
,
div [className "row", style {"padding-bottom" : "10px", marginTop : "-24px"}]
, -}
div [className "row", style {"padding-bottom" : "10px", marginTop : "-24px"}]
[
div [className "col-md-4"]
[
...
...
@@ -464,10 +466,8 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
[ menu [_id "toolbar"]
[ ul'
[
li'
[ button [className "btn btn-success btn-sm"] [text "Change Type"]
]
,
-- li' [ button [className "btn btn-success btn-sm"] [text "Change Type"] ]
-- ,
li'
[ button [
className "btn btn-primary btn-sm"
...
...
@@ -475,10 +475,8 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
]
[text "Toggle Edges"]
]
, li'
[ button [className "btn btn-primary btn-sm"] [text "Change Level"]
]
,li [style {display : "inline-block"}]
-- , li' [ button [className "btn btn-primary btn-sm"] [text "Change Level"] ]
{- ,li [style {display : "inline-block"}]
[ form'
[ input [_type "file"
, name "file"
...
...
@@ -488,14 +486,15 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
-- , text $ show st.readyState
]
]
, li' [ input [_type "button"
-}
{-, li' [ input [_type "button"
, className "btn btn-warning btn-sm"
,value "Run Demo"
-- , onClick \_ -> d SetGraph, disabled (st.readyState /= DONE)
]
]
, li'
-}
{-
, li'
[ form'
[ div [className "col-lg-2"]
[
...
...
@@ -507,16 +506,18 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
[ span [className "glyphicon glyphicon-search"] []
]
]
,input [_type "text", className "form-control", placeholder "select topics"]
,
input [_type "text", className "form-control", placeholder "select topics"]
]
]
]
]
, li [className "col-md-2"]
-}
{-, li [className "col-md-2"]
[ span [] [text "Selector"],input [_type "range", _id "myRange", value "90"]
]
, li [className "col-md-2"]
-}
, li [className "col-md-1"]
[ span [] [text "Labels"],input [_type "range"
, _id "labelSizeRange"
, max "4"
...
...
@@ -526,24 +527,25 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
]
]
, li [className "col-md-
2
"]
, li [className "col-md-
1
"]
[ span [] [text "Nodes"],input [_type "range"
, _id "nodeSizeRange"
, max "
4
"
, max "
15
"
, defaultValue <<< show $ settings ^. _minNodeSize
, min "
1
"
, min "
5
"
, onChange \e -> d $ ChangeNodeSize (numberTargetValue e)
]
]
, li [className "col-md-2"]
{-
, li [className "col-md-2"]
[ span [] [text "Edges"],input [_type "range", _id "myRange", value "90"]
]
-}
, li'
[ button [ className "btn btn-primary"
, onClick \_ -> modCamera0 (const {x: 0.0, y: 0.0, ratio: 1.0})
] [text "Center"]
]
, li [className "col-md-
2
"]
, li [className "col-md-
1
"]
[ span [] [text "Zoom"],input [ _type "range"
, _id "cameraRatio"
, max "100"
...
...
@@ -554,7 +556,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
modCamera0 (const {ratio})
]
]
, li [className "col-m
e-2
"]
, li [className "col-m
d-1
"]
[ span [] [text "MultiNode"]
, input
[ _type "checkbox"
...
...
@@ -566,15 +568,16 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
, li'
[ button [ className "btn btn-primary"
, onClick \_ -> pauseForceAtlas2
] [text "
Pause
"]
] [text "
Spatialization
"]
]
, li'
{-
, li'
[ button [className "btn btn-primary"
, onClick \_ -> do
_ <- log "Hey there" -- $ show st.camera
pure unit
] [text "Save"] -- TODO: Implement Save!
]
-}
]
]
]
...
...
@@ -582,7 +585,7 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
]
, div [className "row"]
[div [if (st.showSidePanel && st.showTree) then className "col-md-10" else if (st.showSidePanel || st.showTree) then className "col-md-10" else className "col-md-12"]
[ div [style {height: "9
0
%"}
[ div [style {height: "9
5
%"}
,onMouseMove sigmaOnMouseMove] $
[
]
...
...
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