From bd0b1787f7638e209d704d469576cbb1ba4dc5d5 Mon Sep 17 00:00:00 2001
From: Ross
Date: Fri, 12 Nov 2021 13:54:53 +0000
Subject: [PATCH] .
---
rapids/templates/rapids/rapid_form.html | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/rapids/templates/rapids/rapid_form.html b/rapids/templates/rapids/rapid_form.html
index 593b5077..a6e15832 100755
--- a/rapids/templates/rapids/rapid_form.html
+++ b/rapids/templates/rapids/rapid_form.html
@@ -10,7 +10,8 @@
let monitor_interval_id = false;
// set to hold the files that are still being processed
- let active_file_inputs = new Set()
+ let active_file_inputs = new Set();
+ let drops_processing = False;
async function listAllFilesAndDirs(dirHandle, files_only) {
const files = [];
@@ -230,6 +231,7 @@
// Loop through each dropped file and try to assign to an
// input element
+ drops_processing = true;
[...evt.dataTransfer.files].forEach((f) => {
feedback = false;
if (evt.target.id == "feedback-drop-target") {
@@ -237,12 +239,7 @@
}
addFile(f, feedback)
})
-
- // // If you want to use some of the dropped files
- // const dT = new DataTransfer();
- // dT.items.add(evt.dataTransfer.files[0]);
- // dT.items.add(evt.dataTransfer.files[3]);
- // fileInput.files = dT.files;
+ drops_processing = false;
evt.preventDefault();
evt.stopPropagation();
@@ -492,7 +489,7 @@ setTimeout(function (){
active_file_inputs.delete(el)
console.log("active", active_file_inputs)
// Only load once all queued files have been processed
- if (active_file_inputs.size < 1) {
+ if (active_file_inputs.size < 1 && !drops_processing) {
loadViewer();
}
}
@@ -666,11 +663,11 @@ answers that match those added below will be used for automatic marking. Multipl
If
the feedback image box is checked they will not be displayed when taking the question.
-
+