From 479c1fca20e91d2e5a6dfc1b8d5ee0dfd0dbfcd1 Mon Sep 17 00:00:00 2001 From: joshuastegmaier Date: Tue, 29 Oct 2024 10:22:12 -0400 Subject: [PATCH] Removed display of built-in error message when an image fails to load --- concordia/static/js/src/viewer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/concordia/static/js/src/viewer.js b/concordia/static/js/src/viewer.js index 20d4d5c12..c797817c7 100644 --- a/concordia/static/js/src/viewer.js +++ b/concordia/static/js/src/viewer.js @@ -221,11 +221,13 @@ thresholdDown.addEventListener('click', function () { let reset = document.getElementById('viewer-reset'); reset.addEventListener('click', resetImageFilterForms); -seadragonViewer.addHandler('open-failed', function (eventData) { - let message = eventData.message; +seadragonViewer.addHandler('open-failed', function () { + // We don't use the eventData or error message + // because it contains the image URL, which we don't + // want to display displayMessage( 'error', - 'Unable to display image: ' + message, + 'Unable to display image', 'openseadragon-open-failed', ); });