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);