summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-28 14:11:46 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-28 14:11:46 +0200
commit778380446d278adf45a9491b699b7e324d9edb8c (patch)
tree5668af71143a3c6da12d4801258af61c0a64ac89 /animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
parentc28213f28693b44bb7cf9c272b3406adc76b1e33 (diff)
setting things as hidden
Diffstat (limited to 'animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js')
-rw-r--r--animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js b/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
index 8825479..f544e6f 100644
--- a/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
+++ b/animism-align/frontend/app/views/viewer/player/components.inline/inline.text.js
@@ -2,14 +2,14 @@ import React, { Component } from 'react'
import { ROMAN_NUMERALS } from 'app/constants'
-export const Paragraph = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick, onDoubleClick }) => {
+export const Paragraph = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick }) => {
+ if (paragraph.hidden) return null
let className = paragraph.type
if (className !== 'paragraph') className += ' paragraph'
if (currentParagraph) className += ' current'
return (
<div
className={className}
- onDoubleClick={e => onDoubleClick(e, paragraph)}
>
{paragraph.annotations.map(annotation => (
<span
@@ -23,13 +23,13 @@ export const Paragraph = ({ paragraph, currentParagraph, currentAnnotation, onAn
)
}
-export const ParagraphHeading = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick, onDoubleClick }) => {
- let className = currentParagraph ? 'header current' : 'header'
+export const ParagraphHeading = ({ paragraph, currentParagraph, currentAnnotation, onAnnotationClick }) => {
+ if (paragraph.hidden) return null
+ let className = currentParagraph ? 'section_heading current' : 'section_heading'
const text = paragraph.annotations.map(annotation => annotation.text).join(' ')
return (
<div
className={className}
- onDoubleClick={e => onDoubleClick(e, paragraph)}
>
<span>{ROMAN_NUMERALS[paragraph.sectionIndex]}{'. '}{text}</span>
</div>