jsnanigans / vue-parallax-js

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

Cannot read property 'offsetTop' of undefined #35

Open tarvitworking opened 3 years ago

tarvitworking commented 3 years ago
<svg class="hp-flower" aria-hidden="true" v-parallax="0.3">
      <use xlink:href="@/assets/img/hp-flower.svg#hp-flower" />
</svg>

TypeError: Cannot read property 'offsetTop' of undefined

etx commented 3 years ago

svg node doesn't have offsetTop can you wrap it in an html element?

guycode commented 3 years ago

Same issue, cannot get it to work with any elements containing an svg. So basically every component...