eddiemf / vue-affix

A Vue.js plugin that affixes an element on the window while scrolling based on a relative element
MIT License
405 stars 38 forks source link

Update relativeElmTopPos to avoid offset problems #50

Open gtso86 opened 5 years ago

gtso86 commented 5 years ago

I'm trying to use affix inside a page where the header have an image, sometimes this image take too long to load, increasing my header after image loaded. Because of that, the relativeElmTopPos is set wrong.

I made this example to show the problem: https://vcfbd.codesandbox.io/

It's possible to recalculate or destroy/rebuild affix?