mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[editor] Add some UI elements in order to set font size & color, and ink thickness & color
This commit is contained in:
parent
4e025e1f08
commit
1a3ef2a0aa
20 changed files with 624 additions and 65 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue