Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new functionality - DOM selector handler #44

Open
J4si3k opened this issue Jun 9, 2020 · 4 comments
Open

new functionality - DOM selector handler #44

J4si3k opened this issue Jun 9, 2020 · 4 comments

Comments

@J4si3k
Copy link

J4si3k commented Jun 9, 2020

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!

@guillaumebriday
Copy link
Owner

That would be great! Could you open a PR with a basic implementation until I take a look?

Thanks

@J4si3k
Copy link
Author

J4si3k commented Jun 9, 2020

That would be great! Could you open a PR with a basic implementation until I take a look?

Thanks

ok, I will try tommorow ;-)

@guillaumebriday
Copy link
Owner

Hey @J4si3k did you have time to work on that?

Thanks

@J4si3k
Copy link
Author

J4si3k commented Jun 15, 2020

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants