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
@ -69,9 +69,9 @@ class AnnotationEditorLayer {
|
|||||||
AnnotationEditorLayer._initialized = true;
|
AnnotationEditorLayer._initialized = true;
|
||||||
FreeTextEditor.initialize(options.l10n);
|
FreeTextEditor.initialize(options.l10n);
|
||||||
InkEditor.initialize(options.l10n);
|
InkEditor.initialize(options.l10n);
|
||||||
|
|
||||||
options.uiManager.registerEditorTypes([FreeTextEditor, InkEditor]);
|
|
||||||
}
|
}
|
||||||
|
options.uiManager.registerEditorTypes([FreeTextEditor, InkEditor]);
|
||||||
|
|
||||||
this.#uiManager = options.uiManager;
|
this.#uiManager = options.uiManager;
|
||||||
this.annotationStorage = options.annotationStorage;
|
this.annotationStorage = options.annotationStorage;
|
||||||
this.pageIndex = options.pageIndex;
|
this.pageIndex = options.pageIndex;
|
||||||
|
@ -637,6 +637,9 @@ class AnnotationEditorUIManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
registerEditorTypes(types) {
|
registerEditorTypes(types) {
|
||||||
|
if (this.#editorTypes) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.#editorTypes = types;
|
this.#editorTypes = types;
|
||||||
for (const editorType of this.#editorTypes) {
|
for (const editorType of this.#editorTypes) {
|
||||||
this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);
|
this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);
|
||||||
|
Loading…
Reference in New Issue
Block a user