Revize 812ee966
Přidáno uživatelem Dominik Poch před téměř 3 roky(ů)
webapp/components/annotation/AnnotationItem.tsx | ||
---|---|---|
34 | 34 |
addOccurrence, |
35 | 35 |
deleteOccurrence, |
36 | 36 |
changePosition, |
37 |
changeNote, |
|
37 | 38 |
changeSentiment, |
38 | 39 |
changeLength, |
39 | 40 |
} = useContext(AnnotationContext); |
... | ... | |
75 | 76 |
changeSentiment(occurrence, val); |
76 | 77 |
}; |
77 | 78 |
|
79 |
const onChangeNote = |
|
80 |
(occurrence: TagInstanceInfo) => (e: ChangeEvent<HTMLTextAreaElement>) => { |
|
81 |
changeNote(occurrence, e.currentTarget.value); |
|
82 |
}; |
|
83 |
|
|
78 | 84 |
/** |
79 | 85 |
* Changes visibility of properties of this annotation. |
80 | 86 |
*/ |
... | ... | |
117 | 123 |
<Row> |
118 | 124 |
<Col> |
119 | 125 |
<Row> |
120 |
<Col |
|
121 |
className="d-flex align-items-center" |
|
122 |
sm="4" |
|
123 |
> |
|
124 |
Pozice: |
|
125 |
</Col> |
|
126 |
<Col> |
|
127 |
<Input |
|
128 |
value={occurrence.position} |
|
129 |
onChange={onChangePosition( |
|
130 |
occurrence |
|
131 |
)} |
|
132 |
/> |
|
133 |
</Col> |
|
126 |
<Col>Pozice: {occurrence.position}</Col> |
|
127 |
</Row> |
|
128 |
<Row> |
|
129 |
<Col>Délka: {occurrence.length}</Col> |
|
134 | 130 |
</Row> |
135 | 131 |
<Row> |
136 | 132 |
<Col |
137 | 133 |
className="d-flex align-items-center" |
138 | 134 |
sm="4" |
139 | 135 |
> |
140 |
Délka:
|
|
136 |
Poznámka:
|
|
141 | 137 |
</Col> |
142 | 138 |
<Col> |
143 |
<Input |
|
144 |
value={occurrence.length}
|
|
145 |
onChange={onChangeLength(occurrence)}
|
|
139 |
<Input.TextArea
|
|
140 |
defaultValue={occurrence.note ?? ''}
|
|
141 |
onChange={onChangeNote(occurrence)}
|
|
146 | 142 |
/> |
147 | 143 |
</Col> |
148 | 144 |
</Row> |
... | ... | |
156 | 152 |
</Col> |
157 | 153 |
<Col> |
158 | 154 |
<Select |
159 |
value={occurrence.sentiment} |
|
155 |
defaultValue={ |
|
156 |
occurrence.sentiment |
|
157 |
} |
|
160 | 158 |
style={{ width: '100%' }} |
161 | 159 |
onChange={onChangeSentiment( |
162 | 160 |
occurrence |
Také k dispozici: Unified diff
Added notes