diff --git a/src/gui/drawLayer.js b/src/gui/drawLayer.js index c1d22a6450..3011cfd3d8 100644 --- a/src/gui/drawLayer.js +++ b/src/gui/drawLayer.js @@ -801,9 +801,6 @@ export class DrawLayer { * @param {Annotation} annotation The annotation to update. */ #updateAnnotationDraw(annotation) { - // update quantification after math shape update - annotation.updateQuantification(); - // update draw if needed if (this.#removeAnnotationDraw(annotation)) { this.#addAnnotationDraw(annotation, true); } diff --git a/src/image/annotationGroup.js b/src/image/annotationGroup.js index e3abbbd6fb..755b704d2e 100644 --- a/src/image/annotationGroup.js +++ b/src/image/annotationGroup.js @@ -154,6 +154,12 @@ export class AnnotationGroup { update(annotation, propKeys) { const index = this.#list.findIndex((item) => item.id === annotation.id); if (index !== -1) { + // update quantification if needed + if (propKeys.includes('mathShape') || + propKeys.includes('textExpr')) { + annotation.updateQuantification(); + } + // update list this.#list[index] = annotation; /** * Annotation update event.