rigor789 / vue-scrollto

Adds a directive that listens for click events and scrolls to elements.
https://vue-scrollto.rigor789.com/
MIT License
2.07k stars 99 forks source link

Scrollspy? #54

Closed hackuun closed 7 years ago

hackuun commented 7 years ago

Hi! Very neat plugin!

But I have a little problem. Seems like vue-scrollto doesn't work for some reason with menuspy plugin, that I am using.

I was thinking, is there a possibility to add scroll spy functional using callback? Tips? May be you will add this feature? They always come closely together... Anyway - thanks, very well crafted code.

rigor789 commented 7 years ago

Hi, thank you!

This plugin does not listen for scroll events, so creating a scroll-spy like behavior is not possible. This feature is also out of the scope of this project, at least for now.

hackuun commented 7 years ago

@rigor789 thankyou for the response. To tell the truth I was hoping it can be solved using onDone

rigor789 commented 7 years ago

You can take actions using onDone, but it may not work as intended (if the scroll is cancelable). But you can't take actions when scrolling manually (we are not listening for scroll events). Describe your use case, so I can tell you if it's possible with this plugin or not.

hackuun commented 7 years ago

Now I got your point. I missed that I need to track if element is active while I scroll, not only when click the link. Then I agree, for the sake of making this library small this should be done without it.

I see you added a label Feature Request, if you still consider, then open issue.