NeXTs / Clusterize.js

Tiny vanilla JS plugin to display large data sets easily
https://clusterize.js.org
MIT License
7.22k stars 414 forks source link

scroll_elem = window #106

Open de-robat opened 7 years ago

de-robat commented 7 years ago

Upfront: Thx for this tool, it's really helpfull and saved me a lot of time!

I came across a strange behaviour today though. I tried setting the scroll_element to window for my use case today. Unfortunatley this does not work as expected. "this.scroll_elem.scrollTop" is going to be undefined in this scenario. The proper scrollPosition for the window is derived via

window.pageYOffset;

I'm wondering, whether im doing something wrong here? I'd be happy to create a Pull Request otherwise

NeXTs commented 7 years ago

Check this PR https://github.com/NeXTs/Clusterize.js/pull/73

de-robat commented 7 years ago

Yep, this is a solution as well, Thx for ponting me to it. This Request is open since 9Months by now though. Any specific reasons why you dont wan't to merge it? (Besides it obviously has merge Conflicts by now :) )