tserkov / vue-scroll-reveal

A Vue directive to wrap @jlmake's excellent ScrollReveal library.
MIT License
163 stars 17 forks source link

First load not working #29

Closed jmharveys closed 5 years ago

jmharveys commented 5 years ago

Hi,

I don't know if it's only happen for me. But it's seem on the first load of the page it's not working... and if it does, it reveal from top instead of bottom. If I refresh the page then it's working as I setup it in my main.js.

Vue.use(VueScrollReveal, {
    class: 'v-scroll-reveal', // A CSS class applied to elements with the v-scroll-reveal directive; useful for animation overrides.
    distance: '20px',
    duration: 800,
    origin: 'bottom',
    scale: 0.95,
    opacity: 0,
    delay: 10,
    interval: 10000,
    reset: true,
    viewOffset: { top: 133, right: 0, bottom: 0, left: 0 },
});

Any clue what could possibly cause this ?

Thanks.