[Editor] Avoid to have a color picker for highlighting twice in the main toolbar
When opening a pdf from the secondary toolbar, a second color picker is added. So in order to avoid that, we just stop listening for annotationeditoruimanager in the toolbar.
This commit is contained in:
parent
8702e1bbb2
commit
cb9c855993
@ -121,12 +121,17 @@ class Toolbar {
|
||||
this.#bindListeners(options);
|
||||
|
||||
if (options.editorHighlightColorPicker) {
|
||||
this.eventBus._on("annotationeditoruimanager", ({ uiManager }) => {
|
||||
this.#setAnnotationEditorUIManager(
|
||||
uiManager,
|
||||
options.editorHighlightColorPicker
|
||||
);
|
||||
});
|
||||
this.eventBus._on(
|
||||
"annotationeditoruimanager",
|
||||
({ uiManager }) => {
|
||||
this.#setAnnotationEditorUIManager(
|
||||
uiManager,
|
||||
options.editorHighlightColorPicker
|
||||
);
|
||||
},
|
||||
// Once the color picker has been added, we don't want to add it again.
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
|
||||
this.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user