arregla cosillas que ha pillado ts

pull/5/head
Borja Robert 2 years ago
parent e544dcf729
commit 87659ccbc0

@ -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;

@ -1,23 +1,15 @@
<script>
import {
title,
heading,
subtitle,
content,
date,
address,
organizedBy,
colabs,
canvas
} from '$lib/stores/store';
import { organizedBy } from '$lib/stores/store';
/** @type {HTMLInputElement} */ let fileinput;
const onFileSelected = (/** @type {Event} */ e) => {
// @ts-ignore
let image = e.target.files[0];
let reader = new FileReader();
reader.readAsDataURL(image);
reader.onload = (e) => {
// @ts-ignore
$organizedBy = [...$organizedBy, { image: e.target.result, text: '' }];
};
};

@ -22,7 +22,6 @@
time: ''
};
}
const year = datetime.split('-')[0];
const monthNumber = datetime.split('-')[1];
const day = datetime.split('-')[2].split('T')[0];
const time = datetime.split('T')[1];

Loading…
Cancel
Save