From ffec59a1058ffef9d9f7fd2f8296c1c71848a04b Mon Sep 17 00:00:00 2001 From: Adriano Date: Sun, 8 Feb 2026 01:22:30 +0100 Subject: [PATCH] fix: annotation overlay in recipe preview and measure view annotationViewer.drawAnnotations() now handles the editor format (objects array with marker/arrow/area) in addition to the legacy format (markers array). This fixes missing overlay in recipe preview and task execution views. Co-Authored-By: Claude Opus 4.6 --- client/static/js/annotation-viewer.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/static/js/annotation-viewer.js b/client/static/js/annotation-viewer.js index 125a457..c7ea3b5 100644 --- a/client/static/js/annotation-viewer.js +++ b/client/static/js/annotation-viewer.js @@ -168,8 +168,17 @@ function annotationViewer() { * Disegna tutti i markers sulle annotazioni */ drawAnnotations() { - if (!this.annotations || !this.annotations.markers) return; + if (!this.annotations) return; + // Editor format (objects array from annotation-editor.js) + if (this.annotations.objects) { + var annoScale = this.canvas.width / (this.annotations.width || this.canvas.width); + _drawEditorAnnotations(this.ctx, this.annotations, annoScale); + return; + } + + // Legacy format (markers array) + if (!this.annotations.markers) return; for (const marker of this.annotations.markers) { const isActive = this.activeMarker === marker.marker_number; this.drawMarker(marker, isActive);