box / viewer.js

A viewer for documents converted with the Box View API
Apache License 2.0
336 stars 99 forks source link

Delayed loading time offset by preloading pages? #193

Open BenjaminHolland10 opened 9 years ago

BenjaminHolland10 commented 9 years ago

Right now when you scroll the next page is loaded by how far down you've scrolled, this works but becomes laggy when a user scrolls fast to the next page. I think preloading pages in a certain range would solve this issue. Currently I have the preloading feature apart of the loadPagesInRange function(line 4879) but this solution seems hacky and would love some input on where and/or how I should implement this.

lakenen commented 9 years ago

I am not sure I understand your question completely. The viewer already does a staggered preload, which pauses when the user scrolls to prevent UI latency.