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

[Editor] Change the enableML pref for enableAltText (bug 1905923)

We want to use this pref to make a Nimbus experiment in the next weeks.
This commit is contained in:
Calixte Denizet 2024-07-05 17:56:41 +02:00
parent e777ae2258
commit 0fba6e570e
8 changed files with 29 additions and 10 deletions

View file

@ -430,7 +430,7 @@ class StampEditor extends AnnotationEditor {
return;
}
this.#hasMLBeenQueried = true;
if (!this._uiManager.hasMLManager || this.hasAltText()) {
if (!this._uiManager.isMLEnabledFor("altText") || this.hasAltText()) {
return;
}
const offscreen = new OffscreenCanvas(width, height);

View file

@ -851,8 +851,8 @@ class AnnotationEditorUIManager {
return this.#mlManager?.guess(data) || null;
}
get hasMLManager() {
return !!this.#mlManager;
isMLEnabledFor(name) {
return !!this.#mlManager?.isEnabledFor(name);
}
get hcmFilter() {