feat(web): pasting coordinates (#11866)

This commit is contained in:
Michel Heusschen 2024-08-17 17:03:34 +02:00 committed by GitHub
parent 0261f79c72
commit 5ef9a8ff8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 2 deletions

View file

@ -1,5 +1,6 @@
<script lang="ts">
import { clamp } from 'lodash-es';
import type { ClipboardEventHandler } from 'svelte/elements';
export let id: string;
export let min: number;
@ -8,6 +9,7 @@
export let required = true;
export let value: number | null = null;
export let onInput: (value: number | null) => void;
export let onPaste: ClipboardEventHandler<HTMLInputElement> | undefined = undefined;
</script>
<input
@ -25,4 +27,5 @@
}
onInput(value);
}}
on:paste={onPaste}
/>