This commit is contained in:
parent
af63f8adf3
commit
deb27fa483
5 changed files with 734 additions and 191 deletions
896
package-lock.json
generated
896
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "embroidery-viewer",
|
"name": "embroidery-viewer",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.2.5",
|
"version": "1.2.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
"postbuild": "npx svelte-sitemap --domain https://embroideryviewer.xyz -o dist"
|
"postbuild": "npx svelte-sitemap --domain https://embroideryviewer.xyz -o dist"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^2.4.1",
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||||
"svelte": "^3.59.1",
|
"svelte": "^5.23.3",
|
||||||
"vite": "^4.3.9"
|
"vite": "^6.2.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,14 +35,15 @@
|
||||||
<div id="container" style="width: 100%; heigth: 100vh;">
|
<div id="container" style="width: 100%; heigth: 100vh;">
|
||||||
{#each Array.from(files) as file, i}
|
{#each Array.from(files) as file, i}
|
||||||
<div class="canvas-container">
|
<div class="canvas-container">
|
||||||
<canvas bind:this={canvasRefs[i]} class="canvas" />
|
<canvas bind:this={canvasRefs[i]} class="canvas"></canvas>
|
||||||
<p><strong>{file.name}</strong></p>
|
<p><strong>{file.name}</strong></p>
|
||||||
<div class="stitches-container" bind:this={stitchesRefs[i]} />
|
<div class="stitches-container" bind:this={stitchesRefs[i]}></div>
|
||||||
<div class="size-container" bind:this={sizeRefs[i]} />
|
<div class="size-container" bind:this={sizeRefs[i]}></div>
|
||||||
<div class="colors-container" bind:this={colorRefs[i]} />
|
<div class="colors-container" bind:this={colorRefs[i]}></div>
|
||||||
<div
|
<div
|
||||||
id="download-button"
|
id="download-button"
|
||||||
role="button"
|
role="button"
|
||||||
|
tabindex=0
|
||||||
on:keydown={onKeydown}
|
on:keydown={onKeydown}
|
||||||
on:click={() => downloadCanvasAsImage(canvasRefs[i], file.name)}
|
on:click={() => downloadCanvasAsImage(canvasRefs[i], file.name)}
|
||||||
>
|
>
|
||||||
|
@ -61,7 +62,7 @@
|
||||||
)}
|
)}
|
||||||
{/each}
|
{/each}
|
||||||
<!-- svelte-ignore a11y-missing-content -->
|
<!-- svelte-ignore a11y-missing-content -->
|
||||||
<h1 bind:this={errorMessageRef} />
|
<h1 bind:this={errorMessageRef}></h1>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<div
|
<div
|
||||||
id="dropzone"
|
id="dropzone"
|
||||||
tabindex={0}
|
tabindex={0}
|
||||||
|
role="region"
|
||||||
on:keydown={onKeydown}
|
on:keydown={onKeydown}
|
||||||
on:click={onClick}
|
on:click={onClick}
|
||||||
on:dragover|preventDefault|stopPropagation
|
on:dragover|preventDefault|stopPropagation
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
import { mount } from 'svelte';
|
||||||
|
import App from './App.svelte';
|
||||||
import "./app.css";
|
import "./app.css";
|
||||||
import App from "./App.svelte";
|
|
||||||
|
|
||||||
const app = new App({
|
const app = mount(App, {
|
||||||
target: document.getElementById("app"),
|
target: document.getElementById('app'),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default app;
|
export default app;
|
Loading…
Add table
Reference in a new issue