summaryrefslogtreecommitdiff
path: root/animism-align/frontend/views/align
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/views/align')
-rw-r--r--animism-align/frontend/views/align/align.css11
-rw-r--r--animism-align/frontend/views/align/components/annotations/annotation.form.js5
-rw-r--r--animism-align/frontend/views/align/components/annotations/annotation.types.js1
3 files changed, 15 insertions, 2 deletions
diff --git a/animism-align/frontend/views/align/align.css b/animism-align/frontend/views/align/align.css
index 12d5b1d..27f4b9e 100644
--- a/animism-align/frontend/views/align/align.css
+++ b/animism-align/frontend/views/align/align.css
@@ -158,6 +158,7 @@ canvas {
z-index: 1;
background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.4));
}
+
.annotation.sentence.even {
background-color: #83b;
}
@@ -167,6 +168,14 @@ canvas {
.annotation.header {
background-color: #838;
}
+.annotation.paragraph_end {
+ background-color: #bbb;
+ width: 100%;
+ padding: 2px;
+}
+
+/* Condensed layout (first lines) */
+
.annotationIndex.condensed .annotation.sentence {
z-index: 0;
white-space: pre;
@@ -177,6 +186,8 @@ canvas {
z-index: 1;
}
+/* Collapsed layout (borders) */
+
.annotationIndex.collapsed .annotation.sentence {
height: 2px; overflow: hidden; padding: 0; z-index: 0;
}
diff --git a/animism-align/frontend/views/align/components/annotations/annotation.form.js b/animism-align/frontend/views/align/components/annotations/annotation.form.js
index e18d6df..226bb45 100644
--- a/animism-align/frontend/views/align/components/annotations/annotation.form.js
+++ b/animism-align/frontend/views/align/components/annotations/annotation.form.js
@@ -12,7 +12,7 @@ import { timeToPosition } from '../../align.util'
import { Select } from '../../../../common'
const ANNOTATION_TYPES = [
- 'sentence', 'header'
+ 'sentence', 'header', 'paragraph_end'
].map(name => ({ name, label: name }))
class AnnotationForm extends Component {
@@ -68,6 +68,9 @@ class AnnotationForm extends Component {
}
handleSubmit() {
const { annotation } = this.props
+ if (annotation.type === 'paragraph_end') {
+ annotation.text = ''
+ }
if (annotation.id === 'new') {
delete annotation.id
actions.annotation.create(annotation)
diff --git a/animism-align/frontend/views/align/components/annotations/annotation.types.js b/animism-align/frontend/views/align/components/annotations/annotation.types.js
index a2eae62..06be4a8 100644
--- a/animism-align/frontend/views/align/components/annotations/annotation.types.js
+++ b/animism-align/frontend/views/align/components/annotations/annotation.types.js
@@ -51,7 +51,6 @@ export const AnnotationParagraphEnd = ({ y, annotation, selected, onClick, onDou
onClick={e => onClick(e, annotation)}
onDoubleClick={e => onDoubleClick(e, annotation)}
>
- {text}
</div>
)
}