vue-scroll-progress-bar
vue-scroll-progress-bar copied to clipboard
new functionality - DOM selector handler
Hello, I really like your plugin, however I would like to ask you to add new functionality. Could you add the option of adding a handler on a given DOM element? I would like to use your plugin on the blog, and the scrollbar position to refer to the article text, but when the page has article, sidebar and footer then the scrollbar measures the entire page, not what the user is interested in - the length of the article. For e.g.
<vue-scroll-progress-bar handler=".post-article" @complete="handleComplete" height="2rem" />
I think this is a nice option. Hold on!
That would be great! Could you open a PR with a basic implementation until I take a look?
Thanks
That would be great! Could you open a PR with a basic implementation until I take a look?
Thanks
ok, I will try tommorow ;-)
Hey @J4si3k did you have time to work on that?
Thanks
Hey @J4si3k did you have time to work on that?
Thanks
I tried a little but I had a problem calculating the ratio of the selected element to the height of the scroll. Unfortunately, I had to deal with another topic but I plan to make a second attempt. I also looked at other libraries or snippets and did not find such an approach. The whole height is measured everywhere :-)