dixonandmoe / rellax

Lightweight, vanilla javascript parallax library
https://dixonandmoe.com/rellax/
MIT License
7.04k stars 880 forks source link

Lead by view port #243

Open cvillalobos opened 2 years ago

cvillalobos commented 2 years ago

Enumerating changes in the rellax.js file:

  1. Line 93 - leadByViewPOrt new configurable attribute for the initialization action.
  2. Line 402 - New isInViewPort() function to check targeted element position according to ViewPort.
  3. Line 420 - New conditional added to allow animation according to leadByViewPort attribute value.
cvillalobos commented 2 years ago

@moeamaya, here is the new PR as requested. Sorry, I just notice the accumulated commits are also here. I tried to remove the formatting changes by resetting the file and applying just my changes. However, if you just want to have one single commit I can remove all this and try to get the repo cloned again and start all over again. Just let me know.