infinite-viewer
infinite-viewer copied to clipboard
How to synchronize the scrolling of multiple `infinite-viewers` instance?
InfiniteViewer instance has scroll-related methods such as scrollTo and scrollBy. I think you should use them.
Suppose I have two infinite-viewers
that both scroll through onScroll
, the first trigger will operate the second, so the second onScroll
will also trigger, so the operation of the first will cause infinite recursion error.
ref: left,right
left.onScroll = right.scrollTo(e.left,e.top) right.onScroll = left.scrollTo(e.left,e.top)