mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
respect animation prefs in MkNumber
This commit is contained in:
parent
a3dc2e8562
commit
fd339717c7
1 changed files with 6 additions and 1 deletions
|
@ -10,6 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { reactive, watch } from 'vue';
|
||||
import number from '@/filters/number.js';
|
||||
import { prefer } from '@/preferences';
|
||||
|
||||
const props = defineProps<{
|
||||
value: number;
|
||||
|
@ -36,7 +37,11 @@ watch(() => props.value, (to, from) => {
|
|||
}
|
||||
}
|
||||
|
||||
if (prefer.s.animation) {
|
||||
window.requestAnimationFrame(step);
|
||||
} else {
|
||||
tweened.number = to;
|
||||
}
|
||||
}, {
|
||||
immediate: true,
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue