remove task from dome when removing images

Changing the functionality to remove task from dom when all images have been removed. This will save system memory in the browser allowing better performance.
This commit is contained in:
AssassinJN
2023-03-15 11:13:26 -04:00
committed by GitHub
parent b7a7a7d31f
commit 2d0a76c5a4

View File

@ -302,7 +302,7 @@ function showImages(reqBody, res, outputContainer, livePreview) {
}
if(allHidden === true) {
const req = htmlTaskMap.get(parentTaskContainer)
if(!req.isProcessing || req.batchesDone == req.batchCount) {parentTaskContainer.classList.add("displayNone")}
if(!req.isProcessing || req.batchesDone == req.batchCount) {parentTaskContainer.parentNode.removeChild(parentTaskContainer)}
}
})
})