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
142
Issues
142
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
41b2021e
Commit
41b2021e
authored
Aug 19, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] RangeSlider calls the onChange event now
parent
ab6b490c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Graph.purs
src/Gargantext/Components/Graph.purs
+2
-3
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+2
-2
RangeSlider.purs
src/Gargantext/Components/RangeSlider.purs
+4
-3
No files found.
src/Gargantext/Components/Graph.purs
View file @
41b2021e
...
...
@@ -76,7 +76,7 @@ type SigmaSettings =
, defaultHoverLabelColor :: String
, defaultLabelColor :: String
-- , defaultLabelHoverColor :: String
-- , defaultLabelSize :: String
, defaultLabelSize :: Number
, defaultNodeBorderColor :: String
, defaultNodeColor :: String
-- , defaultNodeHoverColor :: String
...
...
@@ -112,7 +112,6 @@ type SigmaSettings =
-- , labelHoverColor :: String
-- , labelHoverShadow :: String
-- , labelHoverShadowColor :: String
, labelMaxSize :: Number
, labelSize :: String
, labelSizeRatio :: Number
, labelThreshold :: Number
...
...
@@ -165,6 +164,7 @@ sigmaSettings =
, defaultHoverLabelBGColor: "#fff"
, defaultHoverLabelColor: "#000"
, defaultLabelColor: "#000" -- labels text color
, defaultLabelSize: 3.0 -- (old tina: showLabelsIfZoom)
, defaultNodeBorderColor: "black" -- <- if nodeBorderColor = 'default'
, defaultNodeColor: "#ddd"
, drawEdgeLabels: true
...
...
@@ -176,7 +176,6 @@ sigmaSettings =
, font: "Droid Sans" -- font params
, fontStyle: "bold"
, hideEdgesOnMove: true
, labelMaxSize: 3.0 -- (old tina: showLabelsIfZoom)
, labelSize : "proportional"
, labelSizeRatio: 2.0 -- label size in ratio of node size
, labelThreshold: 2.0 -- min node cam size to start showing label
...
...
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
41b2021e
...
...
@@ -44,10 +44,10 @@ controlsToSigmaSettings { cursorSize: (cursorSize /\ _)
, labelSize: (labelSize /\ _)
, nodeSize: (Range.Closed { min: nodeSizeMin, max: nodeSizeMax } /\ _)
, showEdges: (showEdges /\ _)} = Graph.sigmaSettings {
drawEdges = showEdges
defaultLabelSize = labelSize
, drawEdges = showEdges
, drawEdgeLabels = showEdges
, hideEdgesOnMove = not showEdges
, labelMaxSize = labelSize
, maxEdgeSize = if showEdges then 1.0 else 0.0
, minEdgeSize = if showEdges then 1.0 else 0.0
, maxNodeSize = nodeSizeMax
...
...
src/Gargantext/Components/RangeSlider.purs
View file @
41b2021e
...
...
@@ -12,12 +12,12 @@ import Data.Nullable (Nullable, null, toMaybe)
import Data.Traversable (traverse_)
import Data.Tuple.Nested ((/\))
import DOM.Simple as DOM
import DOM.Simple.Console (log, log2)
import DOM.Simple.Document (document)
import DOM.Simple.Element as Element
import DOM.Simple.Event as Event
import DOM.Simple.EventListener as EL
import DOM.Simple.Types (DOMRect, Element)
import DOM.Simple.Event as Event
import DOM.Simple.Console (log, log2)
import Effect (Effect)
import Effect.Class (liftEffect)
import Effect.Uncurried (EffectFn1, mkEffectFn1)
...
...
@@ -122,9 +122,10 @@ rangeSliderCpt = R.hooksComponent "RangeSlider" cpt
case reproject drag scalePos props.bounds (R2.domMousePosition event) of
Just val -> do
--log2 "reproject val" val
setKnob knob setValue value val
setKnob knob setValue value
$ round props.epsilon props.bounds
val
Nothing -> destroy unit
let onMouseUp = EL.callback $ \(_event :: Event.MouseEvent) -> do
props.onChange value
setDragKnob $ const Nothing
destroy unit
--log "RangeSlider: Creating event handlers"
...
...
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