Skip to content

Make PDF zooming more responsive by using a lower throttle wait

Yuto Takano requested to merge smoother-zoom into master

Closes #364 (closed)

PDF zooming currently has a 500 millisecond debounce, which doesn't feel smooth. But we do need some kind of throttling since the zoom value modifies local storage and re-renders the whole page (= it's costly).

To counter this, I implement two changes:

  • Change from debouncing to throttling (single changes are immediately reflected -- feels smoother)
  • Reduce throttle wait time from 500 to 50ms. This is still miles better than no threshold at all, and it feels acceptably responsive to user input.
Edited by Yuto Takano

Merge request reports

Loading