chore: update eslint config, update tests, constants
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { PANEL_SETTINGS } from "$lib/constants";
|
||||
import { imageConfigState } from "$states/imageConfig.svelte";
|
||||
import { imageState } from "$states/image.svelte";
|
||||
import { textConfigState } from "$states/textConfig.svelte";
|
||||
import { Image, Layer, Stage, Text } from "svelte-konva";
|
||||
|
||||
@@ -12,14 +12,18 @@
|
||||
let { text, stage = $bindable() }: Props = $props();
|
||||
|
||||
let x = $derived(textConfigState.paddingX);
|
||||
let y = $derived(10 + textConfigState.offsetY);
|
||||
let y = $derived(textConfigState.offsetY);
|
||||
let width = $derived(PANEL_SETTINGS.PANEL_WIDTH - 2 * textConfigState.paddingX);
|
||||
let height = PANEL_SETTINGS.PANEL_HEIGHT_DEFAULT;
|
||||
</script>
|
||||
|
||||
<Stage width={320} height={100} bind:this={stage}>
|
||||
<Stage
|
||||
width={PANEL_SETTINGS.PANEL_WIDTH}
|
||||
height={PANEL_SETTINGS.PANEL_HEIGHT_DEFAULT}
|
||||
bind:this={stage}
|
||||
>
|
||||
<Layer>
|
||||
<Image image={imageConfigState.image}></Image>
|
||||
<Image image={imageState.croppedImage}></Image>
|
||||
<Text
|
||||
{text}
|
||||
{x}
|
||||
|
||||
Reference in New Issue
Block a user