diff --git a/packages/frontend/src/components/MkAnalogClock.vue b/packages/frontend/src/components/MkAnalogClock.vue
index 7a5b4bec08..05caffe7d0 100644
--- a/packages/frontend/src/components/MkAnalogClock.vue
+++ b/packages/frontend/src/components/MkAnalogClock.vue
@@ -77,7 +77,7 @@
import { computed, onMounted, onBeforeUnmount, ref } from 'vue';
import tinycolor from 'tinycolor2';
import { globalEvents } from '@/events.js';
-import { defaultIdleRender } from '@/scripts/idle-render.js';
+import { defaultIdlingRenderScheduler } from '@/scripts/idle-render.js';
// https://stackoverflow.com/questions/1878907/how-can-i-find-the-difference-between-two-angles
const angleDiff = (a: number, b: number) => {
@@ -165,7 +165,7 @@ function tick() {
mAngle = Math.PI * (m + s / 60) / 30;
if (sOneRound && sLine.value) { // 秒針が一周した際のアニメーションをよしなに処理する(これが無いと秒が59->0になったときに期待したアニメーションにならない)
sAngle = Math.PI * 60 / 30;
- defaultIdleRender.delete(tick);
+ defaultIdlingRenderScheduler.delete(tick);
sLine.value.addEventListener('transitionend', () => {
disableSAnimate = true;
requestAnimationFrame(() => {
@@ -173,7 +173,7 @@ function tick() {
requestAnimationFrame(() => {
disableSAnimate = false;
if (enabled) {
- defaultIdleRender.add(tick);
+ defaultIdlingRenderScheduler.add(tick);
}
});
});
@@ -201,13 +201,13 @@ function calcColors() {
calcColors();
onMounted(() => {
- defaultIdleRender.add(tick);
+ defaultIdlingRenderScheduler.add(tick);
globalEvents.on('themeChanged', calcColors);
});
onBeforeUnmount(() => {
enabled = false;
- defaultIdleRender.delete(tick);
+ defaultIdlingRenderScheduler.delete(tick);
globalEvents.off('themeChanged', calcColors);
});
diff --git a/packages/frontend/src/components/MkDigitalClock.vue b/packages/frontend/src/components/MkDigitalClock.vue
index 520029bf69..aea20f2489 100644
--- a/packages/frontend/src/components/MkDigitalClock.vue
+++ b/packages/frontend/src/components/MkDigitalClock.vue
@@ -12,7 +12,7 @@
diff --git a/packages/frontend/src/components/global/MkTime.vue b/packages/frontend/src/components/global/MkTime.vue
index b1fad81aba..1e60e3ee44 100644
--- a/packages/frontend/src/components/global/MkTime.vue
+++ b/packages/frontend/src/components/global/MkTime.vue
@@ -11,7 +11,7 @@
import { onUnmounted } from 'vue';
import { i18n } from '@/i18n';
import { dateTimeFormat } from '@/scripts/intl-const';
-import { defaultIdleRender } from '@/scripts/idle-render.js';
+import { defaultIdlingRenderScheduler } from '@/scripts/idle-render.js';
const props = withDefaults(defineProps<{
time: Date | string | number | null;
@@ -52,10 +52,10 @@ function tick(): void {
if (props.mode === 'relative' || props.mode === 'detail') {
tick();
- defaultIdleRender.add(tick);
+ defaultIdlingRenderScheduler.add(tick);
onUnmounted(() => {
- defaultIdleRender.delete(tick);
+ defaultIdlingRenderScheduler.delete(tick);
});
}
diff --git a/packages/frontend/src/scripts/idle-render.ts b/packages/frontend/src/scripts/idle-render.ts
index 09a14cc68c..ffdcde470f 100644
--- a/packages/frontend/src/scripts/idle-render.ts
+++ b/packages/frontend/src/scripts/idle-render.ts
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/no-default-export
-export default class IdleRender {
+export default class IdlingRenderScheduler {
#renderers: Set;
#budget: number;
#rafId: number;
@@ -38,4 +38,4 @@ export default class IdleRender {
}
}
-export const defaultIdleRender = new IdleRender();
+export const defaultIdlingRenderScheduler = new IdlingRenderScheduler();