Clear itneral on img upload
Browse files- src/routes/+page.svelte +3 -0
src/routes/+page.svelte
CHANGED
@@ -208,6 +208,9 @@
|
|
208 |
}
|
209 |
|
210 |
async function drawUploadedImg(file: File) {
|
|
|
|
|
|
|
211 |
const imgEl = new Image();
|
212 |
imgEl.src = URL.createObjectURL(file);
|
213 |
// await image.onload
|
|
|
208 |
}
|
209 |
|
210 |
async function drawUploadedImg(file: File) {
|
211 |
+
if(interval){
|
212 |
+
clearInterval(interval);
|
213 |
+
}
|
214 |
const imgEl = new Image();
|
215 |
imgEl.src = URL.createObjectURL(file);
|
216 |
// await image.onload
|