We already track the vertical offset (pageYOffset) so the perimeter is calculated correctly on scroll (and if the component mounts on a page that is already scrolled).
Horizontal scroll is less common, but still it's good idea to support it nonetheless.
We already track the vertical offset (
pageYOffset) so the perimeter is calculated correctly on scroll (and if the component mounts on a page that is already scrolled).Horizontal scroll is less common, but still it's good idea to support it nonetheless.