diff --git a/static/js/dicomViewer.js b/static/js/dicomViewer.js index a28f4fef..8b8fcc47 100644 --- a/static/js/dicomViewer.js +++ b/static/js/dicomViewer.js @@ -607,19 +607,19 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l } function loadCornerstoneThumb(image) { - img = $("
").get(0); - img.id = "thumb-image-" + id; - img.class = "thumbnail"; - img.title = - "Click on the thumbnail to view and manipulate the image."; - img.draggable = "false"; - img.style = "height: 100px; width: 100px"; - $("#thumb-" + id).append(img); + let img = $("").get(0); + img.id = "thumb-image-" + id; + img.class = "thumbnail"; + img.title = + "Click on the thumbnail to view and manipulate the image."; + img.draggable = "false"; + img.style = "height: 100px; width: 100px"; + $("#thumb-" + id).append(img); - const element = document.getElementById("thumb-image-" + id); - cornerstone.enable(element); - cornerstone.displayImage(element, image); - cornerstone.resize(element); + const element = document.getElementById("thumb-image-" + id); + cornerstone.enable(element); + cornerstone.displayImage(element, image); + cornerstone.resize(element); } if (images.length > 1 && load_as_stack == false) { @@ -674,7 +674,7 @@ export function loadCornerstone(main_element, db, images, annotations_to_load, l } else { if (image_url.startsWith("wadouri")) { cornerstone.loadAndCacheImage(image_url).then(function (image) { - loadCornerstoneThumb(image); + loadCornerstoneThumb(image); }); } else if ((!image_url.endsWith("dicom") && !image_url.endsWith("dcm")) || image_url.startsWith("base64")) { img = $("