thanks for responding!
I am not actually interested in touch scrolling (I saw that someone
said that simply adding a listener for that might effectively disable
threaded scrolling, which is why I mentioned it and this might be
confusing the issue).
I am interested in being able to keep two things synchronized on the
page after one of them scrolls: e.g., after div1 scrolls left, one
sets div2.scrollLeft=div1.scrollLeft. If I disable threaded
scrolling, that works, but it obviously forces the user to set the
flag. If threaded scrolling is used (the default), it is my
understanding that the scroll events are not sent fast enough - and
that simple approach of trying to keep the scrollLeft in sync results
in visible lag.
This example (
http://tdresser.github.io/sync-scroll-offset-test/) and
your example at
http://rbyers.github.io/scroll-blocks-on.html both
display the lag I am trying to avoid: if threaded scrolling is
enabled, you can see the little lag happen (actually whether or not
you have js do busy stuff in your example).
My case is actually a table where a few left columns are fixed and the
header is fixed. This is made of up several divs whose various scroll
properties need to be kept in sync. The little visible lag is very
noticeable when threaded scrolling is being used.
I am wondering if the solution is to have an overlay div that catches
scroll events and then updates the divs underneath it - at least that
way all of the syncs would occur at the same time, but it would of
course be a little more complicated.
Note: datatables has a fixed column feature that somehow avoids this
(I am trying to figure out how):
https://datatables.net/extensions/fixedcolumns/examples/initialisation/left_right_columns.html
Also, ember-tables has fairly good lock-step scrolling (they're using
a ton of divs to mimic a table):
http://opensource.addepar.com/ember-table/#/overview
--
B.F. Lyon, Ph.D.
http://bit.ly/bflyon-viz-summary