fix a few small linting issues
This commit is contained in:
+27
-26
@@ -293,29 +293,29 @@ function loadQuestion(n, section = 1, force_reload = false) {
|
|||||||
// otherwise try to load it as a dicom
|
// otherwise try to load it as a dicom
|
||||||
} else {
|
} else {
|
||||||
// convert the data url to a file
|
// convert the data url to a file
|
||||||
helper.urltoFile(based_img, "dicom", "application/dicom").then(function (
|
helper
|
||||||
dfile
|
.urltoFile(based_img, "dicom", "application/dicom")
|
||||||
) {
|
.then(function (dfile) {
|
||||||
// load the file using cornerstoneWADO file loader
|
// load the file using cornerstoneWADO file loader
|
||||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||||
dfile
|
dfile
|
||||||
);
|
);
|
||||||
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
||||||
const img = $("<div></div>").get(0);
|
const img = $("<div></div>").get(0);
|
||||||
img.id = "thumb-" + id;
|
img.id = "thumb-" + id;
|
||||||
img.class = "thumbnail";
|
img.class = "thumbnail";
|
||||||
img.title =
|
img.title =
|
||||||
"Click on the thumbnail to view and manipulate the image.";
|
"Click on the thumbnail to view and manipulate the image.";
|
||||||
img.draggable = "false";
|
img.draggable = "false";
|
||||||
img.style = "height: 100px; width: 100px";
|
img.style = "height: 100px; width: 100px";
|
||||||
$("#figure-" + id).append(img);
|
$("#figure-" + id).append(img);
|
||||||
|
|
||||||
const element = document.getElementById("thumb-" + id);
|
const element = document.getElementById("thumb-" + id);
|
||||||
cornerstone.enable(element);
|
cornerstone.enable(element);
|
||||||
cornerstone.displayImage(element, image);
|
cornerstone.displayImage(element, image);
|
||||||
cornerstone.resize(element);
|
cornerstone.resize(element);
|
||||||
}); // .catch( function(error) {
|
}); // .catch( function(error) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,11 @@ function loadQuestion(n, section = 1, force_reload = false) {
|
|||||||
} else if (data_url.startsWith("data:application/dicom")) {
|
} else if (data_url.startsWith("data:application/dicom")) {
|
||||||
// stack = stack.split(";")[1];
|
// stack = stack.split(";")[1];
|
||||||
|
|
||||||
const dfile = await helper.urltoFile(data_url, "dicom", "application/dicom");
|
const dfile = await helper.urltoFile(
|
||||||
|
data_url,
|
||||||
|
"dicom",
|
||||||
|
"application/dicom"
|
||||||
|
);
|
||||||
|
|
||||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||||
dfile
|
dfile
|
||||||
@@ -816,7 +820,6 @@ function createQuestionListPanel() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle key button events
|
* Handle key button events
|
||||||
* These are the same as in the RCR pratique implementation
|
* These are the same as in the RCR pratique implementation
|
||||||
@@ -1566,7 +1569,6 @@ function loadFlagsFromDb(qid, n) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function showLoginDialog() {
|
function showLoginDialog() {
|
||||||
$("#login-dialog").modal();
|
$("#login-dialog").modal();
|
||||||
}
|
}
|
||||||
@@ -1575,4 +1577,3 @@ $("#start-exam-button").click(function (evt) {
|
|||||||
window.cid = parseInt($("#candidate-number").val());
|
window.cid = parseInt($("#candidate-number").val());
|
||||||
$.modal.close();
|
$.modal.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
|
/* global cornerstone, cornerstoneTools, cornerstoneBase64ImageLoader, cornerstoneWebImageLoader, cornerstoneWADOImageLoader */
|
||||||
/**
|
/**
|
||||||
* Load the main image
|
* Load the main image
|
||||||
* @param {*} image -
|
* @param {*} image -
|
||||||
@@ -227,4 +228,4 @@ export function debugCornerstone() {
|
|||||||
let dicom_element = document.getElementById("dicom-image");
|
let dicom_element = document.getElementById("dicom-image");
|
||||||
let viewport = cornerstone.getViewport(dicom_element);
|
let viewport = cornerstone.getViewport(dicom_element);
|
||||||
let c = cornerstone.getEnabledElement(dicom_element);
|
let c = cornerstone.getEnabledElement(dicom_element);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user