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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user