From bccda9b80392ac97339658d885d387457b6d43c3 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 20 Aug 2021 10:58:13 +0100 Subject: [PATCH] . --- static/js/dicomViewer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/dicomViewer.js b/static/js/dicomViewer.js index 537980cc..c24c6c26 100644 --- a/static/js/dicomViewer.js +++ b/static/js/dicomViewer.js @@ -599,6 +599,7 @@ function selectThumbClick(evt) { export function registerPrimaryDicomInterface() { // Set mousetools based upon the selected options + let element = document.getElementsByClassName("single-dicom-viewer")[0]; let selections = $("#primary-mouse-binding select"); selections.each((i, option) => { cornerstoneTools.setToolActiveForElement(element, option.value, { @@ -611,6 +612,7 @@ export function registerAltDicomInterface(e) { // Called when control is pressed // Set mousetools based upon the selected options + let element = document.getElementsByClassName("single-dicom-viewer")[0]; let selections = $("#secondary-mouse-binding select"); selections.each((i, option) => { cornerstoneTools.setToolActiveForElement(element, option.value, { @@ -628,6 +630,7 @@ function changeMouseBinding(e, db) { // Directly activate primary tools (secondary will be activated when modifier // key is pressed if (mode == "0") { + let element = document.getElementsByClassName("single-dicom-viewer")[0]; cornerstoneTools.setToolActiveForElement(element, tool, { mouseButtonMask: parseInt(button) }); }