Projekt

Obecné

Profil

« Předchozí | Další » 

Revize c73aecde

Přidáno uživatelem Dominik Poch před asi 2 roky(ů)

Renamed files, fixed overflow in annotation view, added access to the AnnotationContext in annotation view, deleted visiblity from add document modal window, deleted LayoutProps

Zobrazit rozdíly:

webapp/contexts/AnnotationContext.tsx
1 1
import React, { createContext, useContext, useEffect, useState } from 'react';
2 2
import { TagInstanceInfo } from '../api';
3
import { Occurrence, Tag } from '../components/models/tag';
3
import { Occurrence, Tag } from '../components/types/tag';
4 4

  
5 5
interface IAnnotationContextProvider {
6 6
    tags: TagInstanceInfo[] | null;
7 7
    setTags: (newTags: TagInstanceInfo[] | null) => void;
8
    addOccurrence: () => void;
8
    addOccurrence: (tag: Tag) => void;
9 9
    changeVisibility: (tag: Tag) => void;
10 10
    deleteOccurrence: (occurrence: Occurrence) => void;
11 11
    changePosition: (occurrence: Occurrence, newValue: number) => void;
......
17 17
    setTags: (v) => {
18 18
        return;
19 19
    },
20
    addOccurrence: () => {
20
    addOccurrence: (tag: Tag) => {
21 21
        return;
22 22
    },
23 23
    changeVisibility: (tag: Tag) => {
......
36 36

  
37 37
const AnnotationProvider = (props: { children: React.ReactNode }) => {
38 38
    const [tags, setTags] = useState<TagInstanceInfo[] | null>(null);
39
    const addOccurrence = () => {};
39
    const addOccurrence = (tag: Tag) => {};
40 40
    const changeVisibility = (tag: Tag) => {};
41 41
    const deleteOccurrence = (occurrence: Occurrence) => {};
42 42
    const changePosition = (occurrence: Occurrence, newValue: number) => {};

Také k dispozici: Unified diff