diff --git a/src/AnnotationDrawing.js b/src/AnnotationDrawing.js index 1b8be5477a02062c15507999758f473273d9326a..be5a656b28ec00112c8c9ec7488809f1f0d1a932 100644 --- a/src/AnnotationDrawing.js +++ b/src/AnnotationDrawing.js @@ -60,10 +60,6 @@ class AnnotationDrawing extends Component { const osdref = OSDReferences.get(windowId); const videoref = VideosReferences.get(windowId); - if (osdref && videoref) { - console.error('Unhandled case: both OpenSeadragon (picture viewer) and video player on the same canvas'); - } - if (osdref) { const { viewport } = osdref.current; const img = osdref.current.world.getItemAt(0); @@ -99,7 +95,7 @@ class AnnotationDrawing extends Component { }; } - throw new Error('Unknown or missing data player, not OpenSeadragon (picture viewer) nor the video player'); + throw new Error('Unknown or missing data player, not OpenSeadragon (image viewer) nor the video player'); } /** Draw SVG on canvas */ @@ -209,6 +205,9 @@ class AnnotationDrawing extends Component { if (!osdref && !videoref) { throw new Error("Unknown or missing data player, didn't found OpenSeadragon (image viewer) nor the video player"); } + if (osdref && videoref) { + throw new Error('Unhandled case: both OpenSeadragon (image viewer) and video player on the same canvas'); + } const container = osdref ? osdref.current.element : videoref.ref.current.parentElement;