Scrolling not accounted for in x, y coords
I'm using this library to make annotations to long articles. When I scroll the page down, the yStart and yEnd values are not adjusted to take the scrolling into account.
The values returned are relative to the visible screen. However I need them relative to the containing element. I suspect this would be a common use case.
Found a fix: https://stackoverflow.com/questions/28633221/document-body-scrolltop-firefox-returns-0-only-js
const bodyScrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
Note: I'm on Chrome v.63
@swamikevala How did you integrate LightRange as a annotations? Can you share a little bit? Thank you.