Revize c73aecde
Přidáno uživatelem Dominik Poch před asi 2 roky(ů)
webapp/pages/annotation/index.tsx | ||
---|---|---|
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';
|
|
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 | 5 |
import 'antd/dist/antd.css'; |
6 |
import styles from '/styles/annotation.module.scss'; |
|
7 |
import { Occurrence, Tag } from '../../components/models/tag'; |
|
8 |
import AnnotationProvider from '../../contexts/AnnotationContext'; |
|
6 |
import styles from '/styles/Annotation.module.scss'; |
|
7 |
import AnnotationProvider, { AnnotationContext } from '../../contexts/AnnotationContext'; |
|
9 | 8 |
|
10 | 9 |
/** |
11 | 10 |
* Creates an annotation screen. |
12 | 11 |
* @returns The annotation screen. |
13 | 12 |
*/ |
14 | 13 |
function Annotation() { |
15 |
const tags = [ |
|
16 |
{ |
|
17 |
name: 'tag a', |
|
18 |
category: 'kategorie 1', |
|
19 |
visible: true, |
|
20 |
occurrences: [ |
|
21 |
{ position: 2, length: 5 }, |
|
22 |
{ position: 10, length: 2 }, |
|
23 |
], |
|
24 |
}, |
|
25 |
{ |
|
26 |
name: 'tag b', |
|
27 |
category: 'kategorie 2', |
|
28 |
visible: true, |
|
29 |
occurrences: [ |
|
30 |
{ position: 546, length: 432 }, |
|
31 |
{ position: 767, length: 123 }, |
|
32 |
], |
|
33 |
}, |
|
34 |
]; |
|
35 |
|
|
36 |
const addOccurrence = () => {}; |
|
37 |
|
|
38 |
const changeVisibility = (tag: Tag) => {}; |
|
39 |
|
|
40 |
const deleteOccurrence = (occurrence: Occurrence) => {}; |
|
41 |
|
|
42 |
const changePosition = (occurrence: Occurrence, newValue: number) => {}; |
|
43 |
|
|
44 |
const changeLength = (occurrence: Occurrence, newValue: number) => {}; |
|
45 |
|
|
46 | 14 |
return ( |
47 | 15 |
<AnnotationProvider> |
48 | 16 |
<MainLayout> |
49 |
<div className={styles.layoutwrapper}>
|
|
17 |
<div className={styles.layoutWrapper}>
|
|
50 | 18 |
<div className={styles.tags}> |
51 | 19 |
<TagPanel /> |
52 | 20 |
</div> |
... | ... | |
54 | 22 |
<DocumentAnnotationView /> |
55 | 23 |
</div> |
56 | 24 |
<div className={styles.annotations}> |
57 |
<AnnotationPanel |
|
58 |
tags={tags} |
|
59 |
onAddOccurrence={addOccurrence} |
|
60 |
onChangeVisibility={changeVisibility} |
|
61 |
onDeleteOccurrence={deleteOccurrence} |
|
62 |
onChangePosition={changePosition} |
|
63 |
onChangeLength={changeLength} |
|
64 |
/> |
|
25 |
<AnnotationPanel /> |
|
65 | 26 |
</div> |
66 | 27 |
</div> |
67 | 28 |
</MainLayout> |
Také k dispozici: Unified diff
Renamed files, fixed overflow in annotation view, added access to the AnnotationContext in annotation view, deleted visiblity from add document modal window, deleted LayoutProps