mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #17388 from calixteman/no_double_color_picker
[Editor] Avoid to have a color picker for highlighting twice in the main toolbar
This commit is contained in:
commit
f54cfe065a
1 changed files with 11 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue