Projekt

Obecné

Profil

Stáhnout (2.16 KB) Statistiky
| Větev: | Tag: | Revize:
1
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
import { Occurrence, Tag } from '../../components/models/tag';
8

    
9
/**
10
 * Creates an annotation screen.
11
 * @returns The annotation screen.
12
 */
13
function Annotation() {
14
    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
    return (
46
        <MainLayout>
47
            <div className={styles.layoutwrapper}>
48
                <div className={styles.tags}>
49
                    <TagPanel />
50
                </div>
51
                <div className={styles.document}>
52
                    <DocumentAnnotationView />
53
                </div>
54
                <div className={styles.annotations}>
55
                    <AnnotationPanel
56
                        tags={tags}
57
                        onAddOccurrence={addOccurrence}
58
                        onChangeVisibility={changeVisibility}
59
                        onDeleteOccurrence={deleteOccurrence}
60
                        onChangePosition={changePosition}
61
                        onChangeLength={changeLength}
62
                    />
63
                </div>
64
            </div>
65
        </MainLayout>
66
    );
67
}
68

    
69
export default Annotation;
    (1-1/1)