From 87659ccbc07af528b3c955133541830465b1a6d4 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Thu, 29 Sep 2022 01:59:08 +0200 Subject: [PATCH] arregla cosillas que ha pillado ts --- src/lib/form/Form.svelte | 4 ++-- src/lib/form/Organized.svelte | 14 +++----------- src/lib/preview/Preview.svelte | 1 - 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/lib/form/Form.svelte b/src/lib/form/Form.svelte index b78c21d..7e5f4a3 100644 --- a/src/lib/form/Form.svelte +++ b/src/lib/form/Form.svelte @@ -15,7 +15,6 @@ } from '$lib/stores/store'; /** @type {HTMLDivElement} */ let editor; - let fileinput; const handleSubmit = async () => { console.log('submit'); @@ -27,6 +26,7 @@ return; } if (editor && editor.firstChild !== null) { + // @ts-ignore $content = editor.firstChild.innerHTML; } }; @@ -34,7 +34,7 @@ const downloadCanvas = async () => { if ($canvas !== undefined) { const res = await html2canvas($canvas, { backgroundColor: '#fffffff' }); - const image = await res.toDataURL('image/png'); + const image = res.toDataURL('image/png'); const link = document.createElement('a'); link.download = 'cartel.png'; link.href = image; diff --git a/src/lib/form/Organized.svelte b/src/lib/form/Organized.svelte index 896acc5..2430bf9 100644 --- a/src/lib/form/Organized.svelte +++ b/src/lib/form/Organized.svelte @@ -1,23 +1,15 @@