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
132
Issues
132
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
5ae9746e
Commit
5ae9746e
authored
Jun 24, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add confluence slider to graph
parent
1d668acf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+23
-10
No files found.
src/Gargantext/Pages/Corpus/Graph.purs
View file @
5ae9746e
...
...
@@ -34,6 +34,7 @@ import DOM.Simple.Console (log2)
import Gargantext.Components.GraphExplorer.Sigmajs (Color(Color), SigmaEasing, SigmaGraphData(SigmaGraphData), SigmaNode, SigmaSettings, canvas, edgeShape, edgeShapes, forceAtlas2, setSigmaRef, getSigmaRef, cameras, CameraProps, getCameraProps, goTo, pauseForceAtlas2, sStyle, sigmaOnMouseMove, sigma, sigmaEasing, sigmaEdge, sigmaEnableWebGL, sigmaNode, sigmaSettings)
import Gargantext.Components.GraphExplorer.Types (Cluster(..), MetaData(..), Edge(..), GraphData(..), Legend(..), Node(..), getLegendData)
import Gargantext.Components.Login.Types (AuthData(..), TreeId)
import Gargantext.Components.RangeSlider as RangeSlider
import Gargantext.Components.RandomText (words)
import Gargantext.Components.Tree as Tree
import Gargantext.Config as Config
...
...
@@ -43,6 +44,7 @@ import Gargantext.Prelude (flip)
import Gargantext.Types (class Optional)
import Gargantext.Utils (getter, toggleSet)
import Gargantext.Utils.Range as Range
import Gargantext.Utils.Reactix as R2
import Math (cos, sin)
import Partial.Unsafe (unsafePartial)
import React (ReactElement)
...
...
@@ -621,16 +623,17 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
]
]
, li [className "col-md-1"]
[ span [] [text "Confluence"]
,input [ _type "range"
, _id "confluence"
, max "1.0"
, defaultValue "1.0"
, min "1.0"
, onChange \e -> do
let ratio = (100.0 - numberTargetValue e) / 100.0
modCamera0 (const {ratio})
]
[ span [] [ text "Confluence" ]
, R2.scuff $ RangeSlider.rangeSlider (confluenceProps \_ -> pure unit)
-- ,input [ _type "range"
-- , _id "confluence"
-- , max "1.0"
-- , defaultValue "1.0"
-- , min "1.0"
-- , onChange \e -> do
-- let ratio = (100.0 - numberTargetValue e) / 100.0
-- modCamera0 (const {ratio})
-- ]
]
, li [className "col-md-1"]
[ span [] [text "MultiNode"]
...
...
@@ -788,6 +791,16 @@ specOld = fold [treespec treeSpec, graphspec $ simpleSpec performAction render']
]
]
confluenceProps :: (Range.Closed Number -> Effect Unit) -> Record RangeSlider.Props
confluenceProps onChange =
{ onChange
, bounds: Range.closedProbability
, initialValue: Range.closedProbability
, epsilon: 0.05
, step: 0.05
, width: 60.0
, height: 25.0 }
getNodes :: Int -> Aff GraphData
getNodes graphId = get $ Config.toUrl Config.Back Config.Graph $ Just graphId
...
...
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