afina el nombre de guardado

pull/15/head
Borja Robert 2 years ago
parent c7e8c86187
commit 7ee9bae746

@ -38,11 +38,9 @@
const res = await html2canvas($canvas, { scale: 2 }); const res = await html2canvas($canvas, { scale: 2 });
const image = res.toDataURL('image/png'); const image = res.toDataURL('image/png');
const link = document.createElement('a'); const link = document.createElement('a');
const city = $address.split('\n'); link.download = `${$date.split('-')[0]}-${$date.split('-')[1]}-${
link.download = `${$date.split('T')[0]}-${city[city.length - 1].replace( $date.split('-')[2].split('T')[0]
' ', }-${$city.replace(' ', '_')}-cartel.png`;
'_'
)}-cartel.png`;
link.href = image; link.href = image;
link.click(); link.click();
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Loading…
Cancel
Save