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
f9df8e9f
Commit
f9df8e9f
authored
Sep 27, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
R2.StateSetter is now R2.Setter
parent
ffe37f84
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
AnnotatedField.purs
src/Gargantext/Components/Annotation/AnnotatedField.purs
+1
-1
Menu.purs
src/Gargantext/Components/Annotation/Menu.purs
+1
-1
ContextMenu.purs
src/Gargantext/Components/ContextMenu/ContextMenu.purs
+4
-4
RangeSlider.purs
src/Gargantext/Components/RangeSlider.purs
+7
-7
No files found.
src/Gargantext/Components/Annotation/AnnotatedField.purs
View file @
f9df8e9f
...
...
@@ -87,7 +87,7 @@ maybeShowMenu setMenu setTermList ngrams event = do
Nothing -> pure unit
maybeAddMenu
:: R2.S
tateS
etter (Maybe AnnotationMenu)
:: R2.Setter (Maybe AnnotationMenu)
-> R.Element
-> Maybe AnnotationMenu
-> R.Element
...
...
src/Gargantext/Components/Annotation/Menu.purs
View file @
f9df8e9f
...
...
@@ -28,7 +28,7 @@ type AnnotationMenu = { x :: Number, y :: Number | Props }
-- | An Annotation Menu is parameterised by a Maybe Termlist of the
-- | TermList the currently selected text belongs to
annotationMenu :: R2.S
tateS
etter (Maybe AnnotationMenu) -> AnnotationMenu -> R.Element
annotationMenu :: R2.Setter (Maybe AnnotationMenu) -> AnnotationMenu -> R.Element
annotationMenu setMenu { x,y,list,menuType,setList } =
CM.contextMenu { x,y,setMenu } [
R.createElement annotationMenuCpt {list,menuType,setList} []
...
...
src/Gargantext/Components/ContextMenu/ContextMenu.purs
View file @
f9df8e9f
...
...
@@ -21,7 +21,7 @@ import Reactix.DOM.HTML as HTML
import Gargantext.Utils.Reactix as R2
type Props t = ( x :: Number, y :: Number, setMenu :: R2.S
tateS
etter (Maybe t) )
type Props t = ( x :: Number, y :: Number, setMenu :: R2.Setter (Maybe t) )
contextMenu :: forall t. Record (Props t) -> Array R.Element -> R.Element
contextMenu = R.createElement contextMenuCpt
...
...
@@ -62,7 +62,7 @@ contextMenuCpt = R.hooksComponent "ContextMenu" cpt
contextMenuEffect
:: forall t
. R2.S
tateS
etter (Maybe t)
. R2.Setter (Maybe t)
-> R.Ref (Nullable DOM.Element)
-> Effect (Effect Unit)
contextMenuEffect setMenu rootRef =
...
...
@@ -77,14 +77,14 @@ contextMenuEffect setMenu rootRef =
DOM.removeEventListener document "scroll" onScroll
Nothing -> pure R.nothing
documentClickHandler :: forall t. R2.S
tateS
etter (Maybe t) -> DOM.Element -> Callback DE.MouseEvent
documentClickHandler :: forall t. R2.Setter (Maybe t) -> DOM.Element -> Callback DE.MouseEvent
documentClickHandler hide menu =
R2.named "hideMenuOnClickOutside" $ callback $ \e ->
if Element.contains menu (DE.target e)
then pure unit
else hide (const Nothing)
documentScrollHandler :: forall t. R2.S
tateS
etter (Maybe t) -> Callback DE.MouseEvent
documentScrollHandler :: forall t. R2.Setter (Maybe t) -> Callback DE.MouseEvent
documentScrollHandler hide =
R2.named "hideMenuOnScroll" $ callback $ \e -> hide (const Nothing)
...
...
src/Gargantext/Components/RangeSlider.purs
View file @
f9df8e9f
...
...
@@ -34,8 +34,8 @@ import Gargantext.Utils.Range as Range
import Gargantext.Utils.Reactix as R2
-- data Axis = X | Y
type Epsilon = Number
type Bounds = Range.NumberRange
type Epsilon = Number
-- To avoid overloading the terms 'min' and 'max' here, we treat 'min'
-- and 'max' as being the bounds of the scale and 'low' and 'high' as
...
...
@@ -43,7 +43,7 @@ type Bounds = Range.NumberRange
type Props =
( bounds :: Bounds -- The minimum and maximum values it is possible to select
, initialValue :: Range.NumberRange -- The user's selection of minimum and maximum values
, epsilon ::
Epsilon
-- The smallest possible change (for mouse)
, epsilon ::
Number
-- The smallest possible change (for mouse)
, step :: Number -- The 'standard' change (for keyboard)
-- , axis :: Axis -- Which direction to move in
, width :: Number
...
...
@@ -130,7 +130,7 @@ destroyEventHandler name ref = traverse_ destroy $ R.readRef ref
EL.removeEventListener document name handler
R.setRef ref Nothing
setKnob :: Knob -> R2.S
tateS
etter Range.NumberRange -> Range.NumberRange -> Number -> Effect Unit
setKnob :: Knob -> R2.Setter Range.NumberRange -> Range.NumberRange -> Number -> Effect Unit
setKnob knob setValue r val = setValue $ const $ knobSetter knob r val
knobSetter :: Knob -> Range.NumberRange -> Number -> Range.NumberRange
...
...
@@ -168,7 +168,7 @@ renderScaleSel ref props (Range.Closed {min, max}) =
computeWidth = (show $ 100.0 * (percOffsetMax - percOffsetMin)) <> "%"
renderKnob :: Knob -> R.Ref (Nullable DOM.Element) -> Range.NumberRange -> Bounds -> R2.S
tateS
etter (Maybe Knob) -> Int -> R.Element
renderKnob :: Knob -> R.Ref (Nullable DOM.Element) -> Range.NumberRange -> Bounds -> R2.Setter (Maybe Knob) -> Int -> R.Element
renderKnob knob ref (Range.Closed value) bounds set precision =
H.div { ref, tabIndex, className, aria, onMouseDown, style } [
H.div { className: "button" }
...
...
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