From 460ff354da75333d4007521a597bccc6646369bd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 18 Apr 2021 00:02:08 +1000 Subject: [PATCH] apply spinbox limits on each keystroke --- ts/deckconfig/SpinBox.svelte | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ts/deckconfig/SpinBox.svelte b/ts/deckconfig/SpinBox.svelte index 786d51251..984e51a59 100644 --- a/ts/deckconfig/SpinBox.svelte +++ b/ts/deckconfig/SpinBox.svelte @@ -13,15 +13,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export let warnings: string[] = []; export let defaultValue: number = 0; - function blur() { - if (value > max) { - value = max; - } else if (value < min) { - value = min; - } + $: if (value > max) { + value = max; + } else if (value < min) { + value = min; } - +