jsnanigans / vue-parallax-js

Tiny vue component that adds a directive for parallax effect on elements.
121 stars 19 forks source link

Parallax calculation should use the center of the viewport #29

Open thelucre opened 5 years ago

thelucre commented 5 years ago

Problem: Translations are dramatically different for elements depending on where they are in the entire page layout. Using absY or not doesn't help.

Expected: Parallax translations should be relative to the element's position to the window viewport, not the entire page height. An element at dead center of the window viewport should effectively have 0 translation applied, so layouts can be controlled.

thelucre commented 5 years ago

The Rellax library has a similar feature, see: https://github.com/dixonandmoe/rellax/issues/67#issuecomment-354317366