diff --git a/apps/heatmap/init.js b/apps/heatmap/init.js index 370a83d94..ea25a642c 100644 --- a/apps/heatmap/init.js +++ b/apps/heatmap/init.js @@ -60,10 +60,10 @@ function initCore() { $CAMIC.loadImg(async function(e) { Loading.open(document.body, `Loading Data ...`); - $CAMIC.viewer.addHandler('open-failed', function(e){ - console.error(e.message, e) + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); redirect($D.pages.table, e.message, 5); - }) + }); // image loaded if (e.hasError) { $UI.message.addError(e.message); diff --git a/apps/labeling/labeling.js b/apps/labeling/labeling.js index 06f530fe9..50899f0bc 100644 --- a/apps/labeling/labeling.js +++ b/apps/labeling/labeling.js @@ -77,10 +77,10 @@ function initCore() { defaultText: `Slide: ${$D.params.data.name}`, }); } - $CAMIC.viewer.addHandler('open-failed', function(e){ - console.error(e.message, e) + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); redirect($D.pages.table, e.message, 5); - }) + }); }); $CAMIC.viewer.addHandler('open', function() { diff --git a/apps/model/model.js b/apps/model/model.js index 99d117f5d..ad35d55e7 100644 --- a/apps/model/model.js +++ b/apps/model/model.js @@ -404,10 +404,10 @@ function initCore() { } else { $D.params.data = e; } - $CAMIC.viewer.addHandler('open-failed', function(e){ - console.error(e.message, e) + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); redirect($D.pages.table, e.message, 5); - }) + }); }); $CAMIC.store.getSlide($D.params.slideId).then((response) => { diff --git a/apps/segment/segment.js b/apps/segment/segment.js index c6bf774de..46c92240f 100644 --- a/apps/segment/segment.js +++ b/apps/segment/segment.js @@ -371,10 +371,10 @@ function initCore() { } else { $D.params.data = e; } - $CAMIC.viewer.addHandler('open-failed', function(e){ - console.error(e.message, e) + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); redirect($D.pages.table, e.message, 5); - }) + }); }); $CAMIC.viewer.addOnceHandler('open', function(e) { diff --git a/apps/viewer/init.js b/apps/viewer/init.js index cc08e0b8b..8a0c8643d 100644 --- a/apps/viewer/init.js +++ b/apps/viewer/init.js @@ -195,10 +195,10 @@ function initCore() { } $CAMIC.loadImg(function(e) { - $CAMIC.viewer.addHandler('open-failed', function(e){ - console.error(e.message, e) + $CAMIC.viewer.addHandler('open-failed', function(e) { + console.error(e.message, e); redirect($D.pages.table, e.message, 5); - }) + }); // image loaded if (e.hasError) { // if this is a retry, assume normal behavior (one retry per slide)