1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

[Editor] Tweak few values after review from UX

This commit is contained in:
Calixte Denizet 2023-09-20 18:12:12 +02:00
parent 34506f8874
commit b5d18006a7
5 changed files with 38 additions and 33 deletions

View file

@ -874,7 +874,7 @@ class AnnotationEditor {
button.append(tooltip);
button.setAttribute("aria-describedby", id);
const DELAY_TO_SHOW_TOOLTIP = 500;
const DELAY_TO_SHOW_TOOLTIP = 100;
button.addEventListener("mouseenter", () => {
this.#altTextTooltipTimeout = setTimeout(() => {
this.#altTextTooltipTimeout = null;
@ -898,15 +898,11 @@ class AnnotationEditor {
});
}
button.classList.add("done");
if (this.#altTextDecorative) {
tooltip.innerText = await AnnotationEditor._l10nPromise.get(
"editor_alt_text_decorative_tooltip"
);
tooltip.classList.add("decorative");
return;
}
tooltip.innerText = this.#altText;
tooltip.classList.remove("decorative");
tooltip.innerText = this.#altTextDecorative
? await AnnotationEditor._l10nPromise.get(
"editor_alt_text_decorative_tooltip"
)
: this.#altText;
}
getClientDimensions() {