From c532a25378ff83c2e0a021ea7ab2aa8a12811663 Mon Sep 17 00:00:00 2001 From: Linfindel Date: Fri, 16 Feb 2024 10:39:31 +0000 Subject: [PATCH] UI improvements --- filters.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filters.js b/filters.js index 332eb40..ea0668e 100644 --- a/filters.js +++ b/filters.js @@ -337,6 +337,7 @@ function exportImage() { const ctx = canvas.getContext("2d"); img.style.transition = "0s"; + img.style.opacity = "0"; img.style.maxWidth = ""; img.style.maxHeight = ""; @@ -344,7 +345,7 @@ function exportImage() { canvas.height = img.height; ctx.filter = window.getComputedStyle(img).getPropertyValue("filter"); - + const imgElement = new Image(); imgElement.src = img.src; imgElement.crossOrigin = "anonymous"; @@ -354,6 +355,7 @@ function exportImage() { const dataURI = canvas.toDataURL("image/jpeg"); img.style.transition = "0.25s ease"; + img.style.opacity = "1"; img.style.maxWidth = "60vw"; img.style.maxHeight = "60vh";