theojulienne / covid-19-graphics

https://covid.graphics/
6 stars 3 forks source link

Asynchronously re-layout each of the graphs when resizing. #2

Closed spectacular-jagged-berry-melt closed 4 years ago

spectacular-jagged-berry-melt commented 4 years ago

Doing increases the pages responsiveness during resize events, and when toggling the sidebar on mobile.

Notably, toggling the sidebar now takes 20ms to respond to the users click (with the charts updating after ~220ms), whereas prior to this change toggling the sidebar took ~210ms to respond to the users click). --Times measured on a modern macbook simulating a mobile device