[Editor] Load the model when the user switch to the stamp editing mode

This commit is contained in:
Calixte Denizet 2024-08-02 15:00:41 +02:00
parent 464d534961
commit a81b071d2d
3 changed files with 14 additions and 4 deletions

View file

@ -906,6 +906,9 @@ class PDFViewer {
uiManager: this.#annotationEditorUIManager,
});
if (mode !== AnnotationEditorType.NONE) {
if (mode === AnnotationEditorType.STAMP) {
this.#mlManager?.loadModel("altText");
}
this.#annotationEditorUIManager.updateMode(mode);
}
} else {
@ -2311,6 +2314,9 @@ class PDFViewer {
if (!this.pdfDocument) {
return;
}
if (mode === AnnotationEditorType.STAMP) {
this.#mlManager?.loadModel("altText");
}
const { eventBus } = this;
const updater = () => {