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
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
Show 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 =
...
@@ -76,7 +76,7 @@ type SigmaSettings =
, defaultHoverLabelColor :: String
, defaultHoverLabelColor :: String
, defaultLabelColor :: String
, defaultLabelColor :: String
-- , defaultLabelHoverColor :: String
-- , defaultLabelHoverColor :: String
-- , defaultLabelSize :: String
, defaultLabelSize :: Number
, defaultNodeBorderColor :: String
, defaultNodeBorderColor :: String
, defaultNodeColor :: String
, defaultNodeColor :: String
-- , defaultNodeHoverColor :: String
-- , defaultNodeHoverColor :: String
...
@@ -112,7 +112,6 @@ type SigmaSettings =
...
@@ -112,7 +112,6 @@ type SigmaSettings =
-- , labelHoverColor :: String
-- , labelHoverColor :: String
-- , labelHoverShadow :: String
-- , labelHoverShadow :: String
-- , labelHoverShadowColor :: String
-- , labelHoverShadowColor :: String
, labelMaxSize :: Number
, labelSize :: String
, labelSize :: String
, labelSizeRatio :: Number
, labelSizeRatio :: Number
, labelThreshold :: Number
, labelThreshold :: Number
...
@@ -165,6 +164,7 @@ sigmaSettings =
...
@@ -165,6 +164,7 @@ sigmaSettings =
, defaultHoverLabelBGColor: "#fff"
, defaultHoverLabelBGColor: "#fff"
, defaultHoverLabelColor: "#000"
, defaultHoverLabelColor: "#000"
, defaultLabelColor: "#000" -- labels text color
, defaultLabelColor: "#000" -- labels text color
, defaultLabelSize: 3.0 -- (old tina: showLabelsIfZoom)
, defaultNodeBorderColor: "black" -- <- if nodeBorderColor = 'default'
, defaultNodeBorderColor: "black" -- <- if nodeBorderColor = 'default'
, defaultNodeColor: "#ddd"
, defaultNodeColor: "#ddd"
, drawEdgeLabels: true
, drawEdgeLabels: true
...
@@ -176,7 +176,6 @@ sigmaSettings =
...
@@ -176,7 +176,6 @@ sigmaSettings =
, font: "Droid Sans" -- font params
, font: "Droid Sans" -- font params
, fontStyle: "bold"
, fontStyle: "bold"
, hideEdgesOnMove: true
, hideEdgesOnMove: true
, labelMaxSize: 3.0 -- (old tina: showLabelsIfZoom)
, labelSize : "proportional"
, labelSize : "proportional"
, labelSizeRatio: 2.0 -- label size in ratio of node size
, labelSizeRatio: 2.0 -- label size in ratio of node size
, labelThreshold: 2.0 -- min node cam size to start showing label
, 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 /\ _)
...
@@ -44,10 +44,10 @@ controlsToSigmaSettings { cursorSize: (cursorSize /\ _)
, labelSize: (labelSize /\ _)
, labelSize: (labelSize /\ _)
, nodeSize: (Range.Closed { min: nodeSizeMin, max: nodeSizeMax } /\ _)
, nodeSize: (Range.Closed { min: nodeSizeMin, max: nodeSizeMax } /\ _)
, showEdges: (showEdges /\ _)} = Graph.sigmaSettings {
, showEdges: (showEdges /\ _)} = Graph.sigmaSettings {
drawEdges = showEdges
defaultLabelSize = labelSize
, drawEdges = showEdges
, drawEdgeLabels = showEdges
, drawEdgeLabels = showEdges
, hideEdgesOnMove = not showEdges
, hideEdgesOnMove = not showEdges
, labelMaxSize = labelSize
, maxEdgeSize = if showEdges then 1.0 else 0.0
, maxEdgeSize = if showEdges then 1.0 else 0.0
, minEdgeSize = if showEdges then 1.0 else 0.0
, minEdgeSize = if showEdges then 1.0 else 0.0
, maxNodeSize = nodeSizeMax
, maxNodeSize = nodeSizeMax
...
...
src/Gargantext/Components/RangeSlider.purs
View file @
41b2021e
...
@@ -12,12 +12,12 @@ import Data.Nullable (Nullable, null, toMaybe)
...
@@ -12,12 +12,12 @@ import Data.Nullable (Nullable, null, toMaybe)
import Data.Traversable (traverse_)
import Data.Traversable (traverse_)
import Data.Tuple.Nested ((/\))
import Data.Tuple.Nested ((/\))
import DOM.Simple as DOM
import DOM.Simple as DOM
import DOM.Simple.Console (log, log2)
import DOM.Simple.Document (document)
import DOM.Simple.Document (document)
import DOM.Simple.Element as Element
import DOM.Simple.Element as Element
import DOM.Simple.Event as Event
import DOM.Simple.EventListener as EL
import DOM.Simple.EventListener as EL
import DOM.Simple.Types (DOMRect, Element)
import DOM.Simple.Types (DOMRect, Element)
import DOM.Simple.Event as Event
import DOM.Simple.Console (log, log2)
import Effect (Effect)
import Effect (Effect)
import Effect.Class (liftEffect)
import Effect.Class (liftEffect)
import Effect.Uncurried (EffectFn1, mkEffectFn1)
import Effect.Uncurried (EffectFn1, mkEffectFn1)
...
@@ -122,9 +122,10 @@ rangeSliderCpt = R.hooksComponent "RangeSlider" cpt
...
@@ -122,9 +122,10 @@ rangeSliderCpt = R.hooksComponent "RangeSlider" cpt
case reproject drag scalePos props.bounds (R2.domMousePosition event) of
case reproject drag scalePos props.bounds (R2.domMousePosition event) of
Just val -> do
Just val -> do
--log2 "reproject val" val
--log2 "reproject val" val
setKnob knob setValue value val
setKnob knob setValue value
$ round props.epsilon props.bounds
val
Nothing -> destroy unit
Nothing -> destroy unit
let onMouseUp = EL.callback $ \(_event :: Event.MouseEvent) -> do
let onMouseUp = EL.callback $ \(_event :: Event.MouseEvent) -> do
props.onChange value
setDragKnob $ const Nothing
setDragKnob $ const Nothing
destroy unit
destroy unit
--log "RangeSlider: Creating event handlers"
--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