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
aff3539a
Commit
aff3539a
authored
Nov 29, 2018
by
Sudhir Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying the three buttons actions
parent
5fa7464f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
Tree.purs
src/Gargantext/Components/Tree.purs
+2
-2
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+19
-3
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+1
-1
No files found.
src/Gargantext/Components/Tree.purs
View file @
aff3539a
src/Gargantext/Pages/Corpus/Graph.purs
View file @
aff3539a
...
...
@@ -34,6 +34,7 @@ data Action
= LoadGraph Int
| SelectNode SelectedNode
| ShowSidePanel
| ShowControls
newtype SelectedNode = SelectedNode {id :: String, label :: String}
...
...
@@ -47,6 +48,7 @@ newtype State = State
, legendData :: Array Legend
, selectedNode :: Maybe SelectedNode
, showSidePanel :: Boolean
, showControls :: Boolean
}
initialState :: State
...
...
@@ -57,6 +59,7 @@ initialState = State
, legendData : []
, selectedNode : Nothing
, showSidePanel : false
, showControls : false
}
graphSpec :: Spec State {} Action
...
...
@@ -81,6 +84,10 @@ performAction (SelectNode node) _ _ = void do
performAction (ShowSidePanel) _ (State state) = void do
modifyState $ \(State s) -> State s {showSidePanel = not (state.showSidePanel) }
performAction (ShowControls) _ (State state) = void do
modifyState $ \(State s) -> State s {showControls = not (state.showControls) }
convert :: GraphData -> SigmaGraphData
convert (GraphData r) = SigmaGraphData { nodes, edges}
where
...
...
@@ -273,7 +280,15 @@ specOld = simpleSpec performAction render'
where
render' :: Render State {} Action
render' d _ (State st) _ =
[ div [className "row"] [
[ div [className "row"]
[
div [className "col-md-12"]
[ button [className "btn btn-primary"
, onClick \_ -> d ShowControls
,style {position:"relative",top:"-25px",left: "580px"}
] [text "Show Controls"]
]
, if (st.showControls) then
div [className "col-md-12", style {marginBottom : "21px"}]
[ menu [_id "toolbar"]
[ ul'
...
...
@@ -341,6 +356,7 @@ specOld = simpleSpec performAction render'
]
]
]
else div [] []
]
, div [className "row"]
[ div [if (st.showSidePanel) then className "col-md-10" else className "col-md-11"]
...
...
@@ -368,7 +384,7 @@ specOld = simpleSpec performAction render'
<>
if length st.legendData > 0 then [div [style {position : "absolute", bottom : "10px", border: "1px solid black", boxShadow : "rgb(0, 0, 0) 0px 2px 6px", marginLeft : "10px", padding: "16px"}] [dispLegend st.legendData]] else []
]
, button [onClick \_ -> d ShowSidePanel, className "btn btn-primary", style {right:"
0px",position : "relative",zIndex:"1000"}] [text "show sidep
anel"]
, button [onClick \_ -> d ShowSidePanel, className "btn btn-primary", style {right:"
39px",position : "relative",zIndex:"1000", top: "-59px"}] [text "Show SideP
anel"]
, if (st.showSidePanel) then
div [_id "sp-container",className "col-md-2", style {border : "1px black solid", backgroundColor : "beige", position:"absolute",right: "0px",top:"265px"}]
[ div [className "row"]
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
aff3539a
...
...
@@ -130,7 +130,7 @@ layout1 layout =
]
ls = over _render \render d p s c -> [
button [onClick $ \e -> d ShowTree, className "btn btn-primary",style {position:"relative", top: "
68
px",left:"-264px",zIndex : "1000"}] [text "ShowTree"]
button [onClick $ \e -> d ShowTree, className "btn btn-primary",style {position:"relative", top: "
99
px",left:"-264px",zIndex : "1000"}] [text "ShowTree"]
, div [if (s.showTree) then className "col-md-2" else className "col-md-2"] if (s.showTree) then (render d p s c) else []
]
...
...
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