1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[Editor] Allow to change a preference from the editor UI manager

We want to be able to update a global pref (i.e. enableAltText) in using a toggle button in the new alt-text dialog.
This commit is contained in:
Calixte Denizet 2024-07-18 15:12:35 +02:00
parent 5be66580e6
commit 5946d20dc9
2 changed files with 13 additions and 0 deletions

View file

@ -928,6 +928,14 @@ class AnnotationEditorUIManager {
});
}
setPreference(name, value) {
this._eventBus.dispatch("setpreference", {
source: this,
name,
value,
});
}
onPageChanging({ pageNumber }) {
this.#currentPageIndex = pageNumber - 1;
}