apertureless / vue-parallax

🌌 Vue.js component for parallax image scroll effects
MIT License
638 stars 88 forks source link

Custom container listening scroll events #35

Open jungleBadger opened 6 years ago

jungleBadger commented 6 years ago

Description

Vue-parallax only attaches events to the window element itself which works fine for some cases, but if the user needs a custom container overflowing instead of the default window the translate movement does not get applied to the image container.

This feature allows a new prop to be passed to the component, customWrapperReference which is a string reference to an HTML element container (id, class). The scroll event is applied/destroyed to this container instead of the window.

Fix or Feature?

Feature

Environment