mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15: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:
parent
5be66580e6
commit
5946d20dc9
2 changed files with 13 additions and 0 deletions
|
@ -1942,6 +1942,7 @@ const PDFViewerApplication = {
|
|||
{ signal }
|
||||
);
|
||||
eventBus._on("reporttelemetry", webViewerReportTelemetry, { signal });
|
||||
eventBus._on("setpreference", webViewerSetPreference, { signal });
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -3166,4 +3167,8 @@ function webViewerReportTelemetry({ details }) {
|
|||
PDFViewerApplication.externalServices.reportTelemetry(details);
|
||||
}
|
||||
|
||||
function webViewerSetPreference({ name, value }) {
|
||||
PDFViewerApplication.preferences.set(name, value);
|
||||
}
|
||||
|
||||
export { PDFViewerApplication };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue