.
This commit is contained in:
@@ -599,6 +599,7 @@ function selectThumbClick(evt) {
|
|||||||
|
|
||||||
export function registerPrimaryDicomInterface() {
|
export function registerPrimaryDicomInterface() {
|
||||||
// Set mousetools based upon the selected options
|
// Set mousetools based upon the selected options
|
||||||
|
let element = document.getElementsByClassName("single-dicom-viewer")[0];
|
||||||
let selections = $("#primary-mouse-binding select");
|
let selections = $("#primary-mouse-binding select");
|
||||||
selections.each((i, option) => {
|
selections.each((i, option) => {
|
||||||
cornerstoneTools.setToolActiveForElement(element, option.value, {
|
cornerstoneTools.setToolActiveForElement(element, option.value, {
|
||||||
@@ -611,6 +612,7 @@ export function registerAltDicomInterface(e) {
|
|||||||
// Called when control is pressed
|
// Called when control is pressed
|
||||||
|
|
||||||
// Set mousetools based upon the selected options
|
// Set mousetools based upon the selected options
|
||||||
|
let element = document.getElementsByClassName("single-dicom-viewer")[0];
|
||||||
let selections = $("#secondary-mouse-binding select");
|
let selections = $("#secondary-mouse-binding select");
|
||||||
selections.each((i, option) => {
|
selections.each((i, option) => {
|
||||||
cornerstoneTools.setToolActiveForElement(element, option.value, {
|
cornerstoneTools.setToolActiveForElement(element, option.value, {
|
||||||
@@ -628,6 +630,7 @@ function changeMouseBinding(e, db) {
|
|||||||
// Directly activate primary tools (secondary will be activated when modifier
|
// Directly activate primary tools (secondary will be activated when modifier
|
||||||
// key is pressed
|
// key is pressed
|
||||||
if (mode == "0") {
|
if (mode == "0") {
|
||||||
|
let element = document.getElementsByClassName("single-dicom-viewer")[0];
|
||||||
cornerstoneTools.setToolActiveForElement(element, tool, { mouseButtonMask: parseInt(button) });
|
cornerstoneTools.setToolActiveForElement(element, tool, { mouseButtonMask: parseInt(button) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user