mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
place image onto canvas
This commit is contained in:
parent
c9507ed683
commit
6a2e1f48f9
@ -10,6 +10,13 @@
|
||||
let imageURL: string | null, lastImage: File;
|
||||
let uploadData: UploadData;
|
||||
|
||||
async function placeImage() {
|
||||
const fdata = new FormData();
|
||||
fdata.append('x', '0');
|
||||
fdata.append('y', '0');
|
||||
await post(fdata, 'image');
|
||||
}
|
||||
|
||||
async function sendImage(url: string) {
|
||||
const fdata = new FormData();
|
||||
fdata.append('url', url);
|
||||
@ -97,9 +104,14 @@
|
||||
{#await sendImage(dataUrl)}
|
||||
<p>Sending image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
{#await placeImage()}
|
||||
<p>Placing image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{/await}
|
||||
{/await}
|
||||
{/await}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user