mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #15565 from Snuffleupagus/issue-15564
[GENERIC viewer] Ensure that the we register the `editorTypes` for each `AnnotationEditorUIManager`-instance (issue 15564)
This commit is contained in:
commit
c42f58c235
2 changed files with 5 additions and 2 deletions
|
@ -69,9 +69,9 @@ class AnnotationEditorLayer {
|
|||
AnnotationEditorLayer._initialized = true;
|
||||
FreeTextEditor.initialize(options.l10n);
|
||||
InkEditor.initialize(options.l10n);
|
||||
|
||||
options.uiManager.registerEditorTypes([FreeTextEditor, InkEditor]);
|
||||
}
|
||||
options.uiManager.registerEditorTypes([FreeTextEditor, InkEditor]);
|
||||
|
||||
this.#uiManager = options.uiManager;
|
||||
this.annotationStorage = options.annotationStorage;
|
||||
this.pageIndex = options.pageIndex;
|
||||
|
|
|
@ -637,6 +637,9 @@ class AnnotationEditorUIManager {
|
|||
}
|
||||
|
||||
registerEditorTypes(types) {
|
||||
if (this.#editorTypes) {
|
||||
return;
|
||||
}
|
||||
this.#editorTypes = types;
|
||||
for (const editorType of this.#editorTypes) {
|
||||
this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue