Merge pull request #17652 from calixteman/editor_disable_thickness

[Editor] Disable the thickness slider for non-free highlight
This commit is contained in:
calixteman 2024-02-11 18:32:36 +01:00 committed by GitHub
commit 9980447d25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View File

@ -237,6 +237,7 @@ class HighlightEditor extends AnnotationEditor {
AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,
this.#thickness || HighlightEditor._defaultThickness,
],
[AnnotationEditorParamsType.HIGHLIGHT_FREE, this.#isFreeHighlight],
];
}

View File

@ -89,6 +89,7 @@ const AnnotationEditorParamsType = {
HIGHLIGHT_COLOR: 31,
HIGHLIGHT_DEFAULT_COLOR: 32,
HIGHLIGHT_THICKNESS: 33,
HIGHLIGHT_FREE: 34,
};
// Permission flags from Table 22, Section 7.6.3.2 of the PDF specification.

View File

@ -84,6 +84,9 @@ class AnnotationEditorParams {
case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:
editorFreeHighlightThickness.value = value;
break;
case AnnotationEditorParamsType.HIGHLIGHT_FREE:
editorFreeHighlightThickness.disabled = !value;
break;
}
}
});