vivus
vivus copied to clipboard
inViewport Relies on Normal Scroll Container
When a Vivus element is in a scroll container using overflow: auto
it will not appear because isInViewport
uses document
as the only possible scroll container.
This could be solved by allowing the settings object to specify a scrollContext
for the SVG, or maybe allowing an option to disable isInViewport
check.
Hi,
I see.. you're right, I never thought about this problem. But it means that the code should check that all parent nodes are in the viewport to trigger the animation...
However you can still stop the isInViewport
check by using the option start: 'manual'
or start: 'autostart'
(but I'm not sure that's the behavior you expect)