viewport-checker icon indicating copy to clipboard operation
viewport-checker copied to clipboard

Track elements with respect to the original rect

Open bgradin opened this issue 8 years ago • 0 comments

Let's say you're using this library to add an animation to an element when it scrolls into/out of view. You choose a slide animation; the element will slide in from the bottom.

The element scrolls into view. The animation starts. The first keyframe puts the element lower than where it started.

Now the element is out of view, so the classToAdd is removed, and the callback is called. Now the element is in view.

The element flickers into eternity.

bgradin avatar Apr 01 '16 20:04 bgradin