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

[question] use only section anchors, no slide anchors #4247

Open
marconett opened this issue Aug 18, 2021 · 6 comments
Open

[question] use only section anchors, no slide anchors #4247

marconett opened this issue Aug 18, 2021 · 6 comments

Comments

@marconett
Copy link

marconett commented Aug 18, 2021

As I am scrolling through slides automatically (without user interaction), I would like there to be no changes to the url when changing slides, but still be able to use section anchors. Is this possible, or could it be added as a feature?

@marconett marconett changed the title [question] use only section anchor, no slide anchors [question] use only section anchors, no slide anchors Aug 18, 2021
@marconett
Copy link
Author

marconett commented Aug 18, 2021

Doesn't seem to be possible. Introducing a new option (Boolean) disableSlideAnchors and adding another condition around here would make this possible:

if(slideIndex){

I would patch it myself, but I am relying on fullpage.extensions.min.js, which i can't build by myself because I don't have the source.

Currently, my only option is to try and patch the minified js (which is horrific), or waiting for Álvaro to add this and release it.

@alvarotrigo
Copy link
Owner

Have you tried lockAnchors:true?

@marconett
Copy link
Author

Thank you for the quick reply. lockAnchors: true disables section-anchors as well. I only want to disable slide-anchors.

It seems to be possible to achieve my desired behavior with:

onLeave() {
  window.fullpage_api.setLockAnchors(false);
}

onSlideLeave() {
  window.fullpage_api.setLockAnchors(true);
}

But I'm not sure if this works reliably or has any side-effects.

@alvarotrigo
Copy link
Owner

Yeah, right.
There's currently no option out-of-the-box to achieve what you want.

As long as you don't see any side effects using that, you can give it a try :)

@marconett
Copy link
Author

I will keep the solution as is and will see if there are problems with it while testing before release. If there are, I will report back.

Thank you.

@alvarotrigo
Copy link
Owner

I've marked it as a possible enhancement for the future.

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

No branches or pull requests

2 participants