[editor] Add some UI elements in order to set font size & color, and ink thickness & color

This commit is contained in:
Calixte Denizet 2022-06-13 18:23:10 +02:00
parent 4e025e1f08
commit 1a3ef2a0aa
20 changed files with 624 additions and 65 deletions

View file

@ -720,7 +720,9 @@ class BaseViewer {
mode: annotationEditorMode,
});
this.#annotationEditorUIManager = new AnnotationEditorUIManager();
this.#annotationEditorUIManager = new AnnotationEditorUIManager(
this.eventBus
);
}
}
@ -2170,6 +2172,14 @@ class BaseViewer {
this.#annotationEditorUIManager.updateMode(mode);
}
// eslint-disable-next-line accessor-pairs
set annotationEditorParams({ type, value }) {
if (!this.#annotationEditorUIManager) {
throw new Error(`The AnnotationEditor is not enabled.`);
}
this.#annotationEditorUIManager.updateParams(type, value);
}
}
export { BaseViewer, PagesCountLimit, PDFPageViewBuffer };