mirror of
https://github.com/ankitects/anki.git
synced 2026-01-14 14:29:10 -05:00
parent
becffc213d
commit
067fea8245
1 changed files with 4 additions and 5 deletions
|
|
@ -26,12 +26,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
$: if (value) stringValue = value.toFixed(decimalPlaces(step));
|
||||
|
||||
function update(this: HTMLInputElement): void {
|
||||
value = Math.min(max, Math.max(min, parseFloat(this.value)));
|
||||
if (value > max) {
|
||||
value = max;
|
||||
} else if (value < min) {
|
||||
value = min;
|
||||
const newValue = parseFloat(this.value);
|
||||
if (Number.isNaN(newValue)) {
|
||||
return;
|
||||
}
|
||||
value = Math.min(max, Math.max(min, newValue));
|
||||
}
|
||||
|
||||
function handleWheel(event: WheelEvent) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue