From 2d0a76c5a48aecd4bb2f20c72949e519272b4e8f Mon Sep 17 00:00:00 2001 From: AssassinJN Date: Wed, 15 Mar 2023 11:13:26 -0400 Subject: [PATCH] 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. --- ui/media/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 8f1ecea3..cb8e77ce 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -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)} } }) })