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
097e80d8
Commit
097e80d8
authored
Sep 11, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] refresh sigma after settings are set
Also, fix label size to be "fixed".
parent
4c0bca05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
Graph.purs
src/Gargantext/Components/Graph.purs
+4
-4
SlideButton.purs
src/Gargantext/Components/GraphExplorer/SlideButton.purs
+2
-2
Sigma.purs
src/Gargantext/Hooks/Sigmax/Sigma.purs
+3
-1
No files found.
src/Gargantext/Components/Graph.purs
View file @
097e80d8
...
...
@@ -153,7 +153,7 @@ sigmaSettings =
, defaultHoverLabelBGColor: "#fff"
, defaultHoverLabelColor: "#000"
, defaultLabelColor: "#000" -- labels text color
, defaultLabelSize:
3
.0 -- (old tina: showLabelsIfZoom)
, defaultLabelSize:
14
.0 -- (old tina: showLabelsIfZoom)
, defaultNodeBorderColor: "black" -- <- if nodeBorderColor = 'default'
, defaultNodeColor: "#ddd"
, drawEdgeLabels: true
...
...
@@ -165,12 +165,12 @@ sigmaSettings =
, font: "Droid Sans" -- font params
, fontStyle: "bold"
, hideEdgesOnMove: true
, labelSize : "
proportional
"
, labelSize : "
fixed
"
, labelSizeRatio: 2.0 -- label size in ratio of node size
, labelThreshold: 2.0 -- min node cam size to start showing label
, maxEdgeSize:
0
.0
, maxEdgeSize:
1
.0
, maxNodeSize: 30.0
, minEdgeSize:
0
.0 -- in fact used in tina as edge size
, minEdgeSize:
1
.0 -- in fact used in tina as edge size
, minNodeSize: 5.0
, mouseEnabled: true
, mouseZoomDuration: 150.0
...
...
src/Gargantext/Components/GraphExplorer/SlideButton.purs
View file @
097e80d8
...
...
@@ -61,8 +61,8 @@ labelSizeButton sigmaRef state =
sizeButton {
state: state
, caption: "Label Size"
, min:
1
.0
, max:
4
.0
, min:
5
.0
, max:
30
.0
, onChange: \e -> do
let mSigma = Sigmax.readSigma <$> R.readRef sigmaRef
let newValue = readFloat $ R2.unsafeEventValue e
...
...
src/Gargantext/Hooks/Sigmax/Sigma.purs
View file @
097e80d8
...
...
@@ -97,7 +97,9 @@ bind_ s e h = runEffectFn3 _bind s e (mkEffectFn1 h)
foreign import _bind :: forall e. EffectFn3 Sigma String (EffectFn1 e Unit) Unit
setSettings :: forall settings. Sigma -> settings -> Effect Unit
setSettings = runEffectFn2 _setSettings
setSettings sigma settings = do
runEffectFn2 _setSettings sigma settings
refresh sigma
foreign import _setSettings :: forall settings. EffectFn2 Sigma settings Unit
...
...
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