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
6cb50a8c
Commit
6cb50a8c
authored
Mar 25, 2019
by
James Laver
Committed by
Alexandre Delanoë
Apr 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up basic AnnotatedRun
parent
d98240bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
AnnotatedRun.purs
src/Gargantext/Components/Annotated/AnnotatedRun.purs
+8
-8
No files found.
src/Gargantext/Components/Annotated/AnnotatedRun.purs
View file @
6cb50a8c
...
...
@@ -40,22 +40,22 @@ newtype Run = Run { text :: String, list :: Maybe TermList } -- lists :: Array T
-- TODO: Context Menu
-- | A Blank Run is not part an n-gram, but it does have a context menu
renderBlank ::
Run
-> ReactElement
renderBlank =
wrap $ span [className "run run-blank"]
<<< text
renderBlank ::
String
-> ReactElement
renderBlank =
(wrap $ span [className "run run-blank"])
<<< text
-- TODO: Context Menu
renderHilite ::
Run
-> ReactElement
renderHilite
r = span [className "run run-pretty", title tooltip] [text r.te
xt]
renderHilite ::
String -> TermList
-> ReactElement
renderHilite
txt list = span [className "run run-pretty", title tooltip] [text t
xt]
-- (wrap wrapping) $ foldl wrapColour head r.lists
where tooltip = "Occurs in the " <> termListName
r.
list
where tooltip = "Occurs in the " <> termListName list
-- lists = names r.lists
-- head = span [className "run run-pretty", title (tooltip lists)] [text r.text]
-- wrapping = span [className "run run-pretty"]
render :: Run -> ReactElement
render
r
|
r.lists == [] = renderBlank r.text
| otherwise = render
Hilite r
render
(Run r)
|
Just l <- r.list = renderHilite r.text l
| otherwise = render
Blank r.text
data Action = AddTerm Term | RemoveTerm Term
...
...
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