Skip to content

Commit c0d9141

Browse files
committed
feat: add window resize event listener to reinitialize orbit animation for better responsiveness
1 parent c05aa68 commit c0d9141

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/ChronologyOfStellarTrails/detail.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@ function handleBackButton() {
593593
}
594594
}
595595

596+
// resize
597+
window.addEventListener('resize', () => {
598+
initOrbitAnimation();
599+
});
600+
596601
// 初始化页面
597602
document.addEventListener("DOMContentLoaded", function () {
598603
initCurrentMissionIndex(); // 根据localStorage初始化任务索引

0 commit comments

Comments
 (0)