Stanko / react-plx

React parallax component, powerful and lightweight
https://muffinman.io/react-plx/
MIT License
689 stars 51 forks source link

Set `end:` as pixel-difference to `start` ? #71

Closed xstable closed 4 years ago

xstable commented 4 years ago

Would be awesome if there would be a way to set the "end" parameter depending on the start-parameter.

Example:

      {
        "start":"self",
        "end":  <here>,  // self + px entered here
        "properties":[
          {
            "startValue":0,
            "endValue":300,
            "property":"translateY"
          }
        ]
      }

Means if "self" is on "1500px" and you set "end:" "+250px" this should result in setting end to 1750px. Is there still a way to archive this?

xstable commented 4 years ago

Ok, sorry read it just some minutes later: duration is the parameter for parallaxData I was searching for.