Skip to content

Commit ee01fad

Browse files
fix bugs in addannotationpanel
1 parent 194b7e8 commit ee01fad

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

site/src/AddAnnotationPanel.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {Annotation, AnnotationCode} from "./data/annotations";
22
import {TimeManager} from "./TimeManager";
3+
import {globals} from "./globals";
34

45
export class AddAnnotationPanel {
56
private panel: HTMLElement;
@@ -174,7 +175,7 @@ export class AddAnnotationPanel {
174175
const annotation: Annotation = {
175176
act,
176177
code: codes,
177-
annotation: text,
178+
annotation: {'fr': text, 'en': text, 'de': text, "pt": text},
178179
is_general: false,
179180
page_range: [0, 0],
180181
measure_range: [bar, bar],
@@ -202,7 +203,7 @@ export class AddAnnotationPanel {
202203
checkbox.checked = annotationToEdit.code.includes(checkbox.value as AnnotationCode);
203204
}
204205
(this.panel.querySelector('#add-annotation-text') as HTMLTextAreaElement).value =
205-
annotationToEdit.annotation;
206+
annotationToEdit.annotation[globals.language];
206207
this.submitButton.textContent = 'Save';
207208
} else {
208209
(this.panel.querySelector('#add-annotation-act') as HTMLSelectElement).value =

0 commit comments

Comments
 (0)