1 |
6d10fe14
|
Dominik Poch
|
import { AnnotationPanel } from '../../components/annotation/annotationPanel';
|
2 |
|
|
import { DocumentAnnotationView } from '../../components/annotation/documentAnnotationView';
|
3 |
|
|
import { TagPanel } from '../../components/annotation/tagPanel';
|
4 |
|
|
import { MainLayout } from '../../layouts/mainLayout';
|
5 |
|
|
import 'antd/dist/antd.css';
|
6 |
|
|
import styles from '/styles/annotation.module.scss';
|
7 |
a80db039
|
Dominik Poch
|
import { Occurrence, Tag } from '../../components/models/tag';
|
8 |
6d10fe14
|
Dominik Poch
|
|
9 |
|
|
/**
|
10 |
|
|
* Creates an annotation screen.
|
11 |
|
|
* @returns The annotation screen.
|
12 |
|
|
*/
|
13 |
|
|
function Annotation() {
|
14 |
a80db039
|
Dominik Poch
|
const tags = [
|
15 |
|
|
{
|
16 |
|
|
name: 'tag a',
|
17 |
|
|
category: 'kategorie 1',
|
18 |
|
|
visible: true,
|
19 |
|
|
occurrences: [
|
20 |
|
|
{ position: 2, length: 5 },
|
21 |
|
|
{ position: 10, length: 2 },
|
22 |
|
|
],
|
23 |
|
|
},
|
24 |
|
|
{
|
25 |
|
|
name: 'tag b',
|
26 |
|
|
category: 'kategorie 2',
|
27 |
|
|
visible: true,
|
28 |
|
|
occurrences: [
|
29 |
|
|
{ position: 546, length: 432 },
|
30 |
|
|
{ position: 767, length: 123 },
|
31 |
|
|
],
|
32 |
|
|
},
|
33 |
|
|
];
|
34 |
|
|
|
35 |
|
|
const addOccurrence = () => {};
|
36 |
|
|
|
37 |
|
|
const changeVisibility = (tag: Tag) => {};
|
38 |
|
|
|
39 |
|
|
const deleteOccurrence = (occurrence: Occurrence) => {};
|
40 |
|
|
|
41 |
|
|
const changePosition = (occurrence: Occurrence, newValue: number) => {};
|
42 |
|
|
|
43 |
|
|
const changeLength = (occurrence: Occurrence, newValue: number) => {};
|
44 |
|
|
|
45 |
6d10fe14
|
Dominik Poch
|
return (
|
46 |
|
|
<MainLayout>
|
47 |
ce63b2ab
|
Dominik Poch
|
<div className={styles.layoutwrapper}>
|
48 |
|
|
<div className={styles.tags}>
|
49 |
6d10fe14
|
Dominik Poch
|
<TagPanel />
|
50 |
ce63b2ab
|
Dominik Poch
|
</div>
|
51 |
|
|
<div className={styles.document}>
|
52 |
6d10fe14
|
Dominik Poch
|
<DocumentAnnotationView />
|
53 |
ce63b2ab
|
Dominik Poch
|
</div>
|
54 |
|
|
<div className={styles.annotations}>
|
55 |
a80db039
|
Dominik Poch
|
<AnnotationPanel
|
56 |
|
|
tags={tags}
|
57 |
|
|
onAddOccurrence={addOccurrence}
|
58 |
|
|
onChangeVisibility={changeVisibility}
|
59 |
|
|
onDeleteOccurrence={deleteOccurrence}
|
60 |
|
|
onChangePosition={changePosition}
|
61 |
|
|
onChangeLength={changeLength}
|
62 |
|
|
/>
|
63 |
ce63b2ab
|
Dominik Poch
|
</div>
|
64 |
|
|
</div>
|
65 |
6d10fe14
|
Dominik Poch
|
</MainLayout>
|
66 |
|
|
);
|
67 |
|
|
}
|
68 |
|
|
|
69 |
|
|
export default Annotation;
|