2021-04-12 06:18:30 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
|
|
|
import { stepsToString, stringToSteps } from "./steps";
|
|
|
|
|
|
|
|
export let value: number[];
|
|
|
|
|
|
|
|
let stringValue: string;
|
|
|
|
$: stringValue = stepsToString(value);
|
|
|
|
|
|
|
|
function update(this: HTMLInputElement): void {
|
2021-05-28 23:59:20 +02:00
|
|
|
value = stringToSteps(this.value);
|
2021-04-12 06:18:30 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-12-01 10:24:26 +01:00
|
|
|
<input type="text" value={stringValue} on:blur={update} />
|
2021-06-21 21:16:40 +02:00
|
|
|
|
|
|
|
<style lang="scss">
|
2022-12-01 10:24:26 +01:00
|
|
|
input {
|
|
|
|
width: 100%;
|
2021-06-21 21:16:40 +02:00
|
|
|
}
|
|
|
|
</style>
|