-
Notifications
You must be signed in to change notification settings - Fork 439
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
Allow to set an offset only for scrollspy #143
Comments
Hi, A possible solution would be to add padding to your element instead of offset. offset is calculated on using to/name and not with id. |
Hi, What i try to explain is that i want a different offset for scrollspy & scrollto. I don't see how set a padding will solve this. Do you want a codepen or similar to illustrate this ? |
I have the same trouble. It would be a nice feature. Is hard to explain and because of that i make this animated gif. http://imgur.com/a/NLFuh |
Btw, @talend-sromain i make this PR with the fix (you'll have the property scrolloffset to manage the changes active element on the menu) |
In a screen i develop, i have some elements i want to spy in a left menu and when i click on them, i go smoothly to their position.
I set the offset to match the scroll position when i click, but theses elements don't take all the browser height, so, it's kind of weird when i scroll because scroll spy trigger only when the element ( with offset ) is on the top of the browser.
I suggest to add some behaviour to specify a prop, like spyOffset that can be use in spy algorithm if specified instead of offset.
If spyOffset is not defined, it take the offset if defined.
What do you think of this ?
As i need this feature, i can contribute to make it if you want.
The text was updated successfully, but these errors were encountered: