Deleted Console logs and adjusted some comments.

This commit is contained in:
ge64qev
2024-05-14 09:13:39 +02:00
parent 36192ba560
commit ce3e98e240
2 changed files with 3 additions and 5 deletions

View File

@@ -109,10 +109,7 @@ function setupFileInput(chooser) {
// Listen for event of file being removed and then filter it out of the allFiles array
document.addEventListener("fileRemoved", function (e) {
const fileId = e.detail;
console.log('File to be removed:', fileId); // Log the uniqueId of the file to be removed
console.log('All files before removal:', allFiles); // Log all files before removal
allFiles = allFiles.filter(fileObj => fileObj.uniqueId !== fileId); // Remove the file from the allFiles array using the unique identifier
console.log('All files after removal:', allFiles); // Log all files after removal
// Dispatch a custom event with the allFiles array
var filesUpdated = new CustomEvent("filesUpdated", { detail: allFiles });
document.dispatchEvent(filesUpdated);