vivus icon indicating copy to clipboard operation
vivus copied to clipboard

inViewport Relies on Normal Scroll Container

Open jlukic opened this issue 8 years ago • 1 comments

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.

jlukic avatar Oct 13 '16 21:10 jlukic

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)

maxwellito avatar Oct 16 '16 14:10 maxwellito