Skip to content

Commit

Permalink
Respect prefers-reduced-motion on moving map in home screen (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
wipfli authored Apr 29, 2024
1 parent a55c862 commit bc3f5a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ function mapPreview(container) {
});
}

(window.onload = playAnimation),
setInterval(playAnimation, lastPoint.Pause + lastPoint.Duration);
if (!window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
(window.onload = playAnimation),
setInterval(playAnimation, lastPoint.Pause + lastPoint.Duration);
}
}

function terrain3dMap(container) {
Expand Down

0 comments on commit bc3f5a2

Please sign in to comment.