small fixes
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ export function postAnswers(ans) {
|
|||||||
(data) => {
|
(data) => {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
alert("Answers sucessfully submitted.");
|
alert(`${data.question_count} answers sucessfully submitted.`);
|
||||||
} else {
|
} else {
|
||||||
alert(`Error submitting answers: ${data.error}`);
|
alert(`Error submitting answers: ${data.error}`);
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-14
@@ -1748,22 +1748,25 @@ $(".start-packet-button").click(function (evt) {
|
|||||||
|
|
||||||
window.timer = timer;
|
window.timer = timer;
|
||||||
|
|
||||||
$("#timer").click(() => {
|
// If we are not in an exam we can pause the session
|
||||||
window.timer.pause();
|
if (!window.exam_mode) {
|
||||||
|
$("#timer").click(() => {
|
||||||
|
window.timer.pause();
|
||||||
|
|
||||||
let time_remaining = window.timer.getTimeValues().toString();
|
let time_remaining = window.timer.getTimeValues().toString();
|
||||||
|
|
||||||
$("#pause").empty();
|
$("#pause").empty();
|
||||||
$("#pause").append(
|
$("#pause").append(
|
||||||
$(
|
$(
|
||||||
`<div id="pause-text">Session paused<div id="pause-time-remaining">You have ${time_remaining} remaining.</div></div><button id="resume-exam-button" class="navigation dialog-yes">Click to resume</button>`
|
`<div id="pause-text">Session paused<div id="pause-time-remaining">You have ${time_remaining} remaining.</div></div><button id="resume-exam-button" class="navigation dialog-yes">Click to resume</button>`
|
||||||
).click(() => {
|
).click(() => {
|
||||||
$("#pause").hide();
|
$("#pause").hide();
|
||||||
timer.start();
|
timer.start();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
$("#pause").show();
|
$("#pause").show();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// //const t = 2;
|
// //const t = 2;
|
||||||
// let display = document.querySelector("#timer");
|
// let display = document.querySelector("#timer");
|
||||||
|
|||||||
+8
-6
@@ -20,7 +20,11 @@ export function loadMainImage(image, stack) {
|
|||||||
cornerstoneTools.addToolState(element, "stack", stack);
|
cornerstoneTools.addToolState(element, "stack", stack);
|
||||||
|
|
||||||
cornerstoneTools.addTool(PanTool);
|
cornerstoneTools.addTool(PanTool);
|
||||||
cornerstoneTools.addTool(ZoomTool);
|
cornerstoneTools.addTool(ZoomTool, {
|
||||||
|
configuration: {
|
||||||
|
invert: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
cornerstoneTools.addTool(WwwcTool);
|
cornerstoneTools.addTool(WwwcTool);
|
||||||
cornerstoneTools.addTool(RotateTool);
|
cornerstoneTools.addTool(RotateTool);
|
||||||
cornerstoneTools.addTool(StackScrollTool);
|
cornerstoneTools.addTool(StackScrollTool);
|
||||||
@@ -503,11 +507,7 @@ export function openMainImage(current_question, t, source) {
|
|||||||
} 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 urltoFile(
|
const dfile = await urltoFile(data_url, "dicom", "application/dicom");
|
||||||
data_url,
|
|
||||||
"dicom",
|
|
||||||
"application/dicom"
|
|
||||||
);
|
|
||||||
|
|
||||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||||
dfile
|
dfile
|
||||||
@@ -535,6 +535,8 @@ export function openMainImage(current_question, t, source) {
|
|||||||
if (open_figure != undefined) {
|
if (open_figure != undefined) {
|
||||||
// No full size figure / dicom loaded yet
|
// No full size figure / dicom loaded yet
|
||||||
if (figure_to_load == open_figure) {
|
if (figure_to_load == open_figure) {
|
||||||
|
// Scroll to the image if it is already open
|
||||||
|
document.getElementById("dicom-image").scrollIntoView();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
let el;
|
let el;
|
||||||
|
|||||||
Reference in New Issue
Block a user