Thanks for the great work!
I noticed in some scenario's the _fullOffset doesn't provided the correct value. Currently i made an alternative to jquery or allow to provide a custom implementation to resolve the offset. however others could be added, for example the more performant getBoundingClientRect.
Also i noticed that after a destroy call, the onscroll handler could still be active after start is called again, in that case the parent is gone, which makes this method throw errors. i made a simple early return for that, so at least error's aren't thrown. of course this is an implementation error, but i believe it should be shielded against it.
For the offset is not calculated properly, i think it should be fixed right there.
I am planning to remove jQuery dependency so it is not an option for me to use jQuery for offset calculation.
fullOffset is an internal part of an internal calculation. I don't think it is best to receive this bit from external sources as an option.
getBoundingClientRectangle gives the offset relative to viewport, offset is relative to the document. I am using getBoundingClientRectangle at some calculations but not for the offset. I will definitely consider if it will be useful eliminating offset calculation.
One should not use the instance anymore once it is destroyed, because it is destroyed. Methods are reachable because they stay in the prototype. User should break the references to the instance to let it garbage collected. One should use "stop" instead of "destroy", if they intend to use "start" on the instance.
Hi,
Thanks for the great work! I noticed in some scenario's the _fullOffset doesn't provided the correct value. Currently i made an alternative to jquery or allow to provide a custom implementation to resolve the offset. however others could be added, for example the more performant getBoundingClientRect. Also i noticed that after a destroy call, the onscroll handler could still be active after start is called again, in that case the parent is gone, which makes this method throw errors. i made a simple early return for that, so at least error's aren't thrown. of course this is an implementation error, but i believe it should be shielded against it.