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

setAllowScrolling(false) confusing docs + hide arrows when disabled horizontally #4256

Closed
aoloe opened this issue Aug 26, 2021 · 8 comments
Closed

Comments

@aoloe
Copy link

aoloe commented Aug 26, 2021

Description

The documentation suggests to add:

fullpage_api.setAllowScrolling(false);

after fullPage has been initialized.

This leads to two issues:

  • the left and right arrow for the slides do not work anymore.
  • swiping on mobile does not work anymore (which I could work around with swiped-event.js and four calls to your API).

While the second effect might be wanted, the first one is rather disturbing and it took me sometime to understand why the arrow buttons did not work.

I would be glad if:

  • you could explain why you are suggesting to turn of the scrolling,
  • and fix the way you are disabling and filtering the events.

Link to isolated reproduction with no external CSS / JS

https://jsfiddle.net/tyohu1gj/

Steps to reproduce it

  1. disable AllowScrolling
  2. reload
  3. click

Versions

the newest distributed fullPage.js.

@alvarotrigo
Copy link
Owner

The documentation suggests to add fullpage_api.setAllowScrolling(false); after fullPage has been initialized.

Where? 🤔

What are you trying to achieve?

@aoloe
Copy link
Author

aoloe commented Aug 28, 2021

just to be clear: the main problem is that

fullpage_api.setAllowScrolling(false);

disables the arrows for the slides.

please see the jsfiddle. it's a fork of your own fiddle with further options.

and that's not a question but a bug: if you show the arrows, they must work : - )

on top of it, the places where you suggest to use `setAllowScrolling(false) are:

you might be setting a random option, to show that option can be set through the API.
but the way you're doing it, will lead many people to believe that the options you're setting are the ones a beginner should set.

not really a question either.

personally, i'm hesitant to get involved in this ticket and help you improve your library. the unclear license conditions almost made me not to use it at all. (again, to be clear: making it GPL3 with no string attached would help; a liberal license with open core would be even better)

you know: the research needed for filling this ticket, solved the issue for me... so i don't have a personal interest in it....

@alvarotrigo
Copy link
Owner

on top of it, the places where you suggest to use `setAllowScrolling(false) are:

Perhaps I need to update the docs to clarify it.
I'm not recommending using such a method at all. It's just an example of how to use methods, as the way varies depending on if you use jQuery or not.

So, no, you don't have to use setAllowScrolling(false) at all unless you want to prevent scrolling :)

you might be setting a random option, to show that option can be set through the API.
but the way you're doing it, will lead many people to believe that the options you're setting are the ones a beginner should set.

What would you suggest to use instead on the docs?
I'm open to any ideas.

Answering your two questions:

I would be glad if:
you could explain why you are suggesting to turn of the scrolling,

I'm not suggesting it.

and fix the way you are disabling and filtering the events.

What exactly do you think we have to fix?
Hiding the arrows when using setAllowScrlling(false) or setting false to horizontal directions?

you know: the research needed for filling this ticket, solved the issue for me... so i don't have a personal interest in it....

Fair enough.
Feel free to reply if you feel like. Otherwise I'll close the issue and consider updating the docs accordingly ;)

@alvarotrigo alvarotrigo changed the title fullpage_api.setAllowScrolling(false) disables the actions on the left/right arrows buttons for the slides fullpage_api.setAllowScrolling(false) confusing docs + hide arrows when disabled horizontally Aug 29, 2021
@alvarotrigo alvarotrigo changed the title fullpage_api.setAllowScrolling(false) confusing docs + hide arrows when disabled horizontally setAllowScrolling(false) confusing docs + hide arrows when disabled horizontally Aug 29, 2021
@aoloe
Copy link
Author

aoloe commented Sep 2, 2021

i might not been clear enough:

fullpage_api.setAllowScrolling(false);

disables the horizontal scrolling in the slides but the arrows are still showing.

please have a look at the jsfiddle attached.

this is a bug.

and this is the main part of this ticket.

@aoloe
Copy link
Author

aoloe commented Sep 2, 2021

concerning the documentation: in my eyes you should show how to initialize fullPage with the minimal needed code.

in a second snippet you can then set some random options and tell the user what they can achieve with it.

As an example:


Initialization with Vanilla Javascript

All you need to do is call fullPage.js before the closing </body> tag.

new fullpage('#fullpage', {
	//options here
});

You can set options both by adding values to the optional object or by calling the API functions:

new fullpage('#fullpage', {
	autoScrolling:true,
	scrollHorizontally: true
});

//methods
fullpage_api.setAllowScrolling(false);

The first call enables this and that, with the second one you disable blah.


@alvarotrigo
Copy link
Owner

alvarotrigo commented Sep 2, 2021

disables the horizontal scrolling in the slides but the arrows are still showing.

It never intended to hide the arrows.
But now that you mention it, perhaps it could be a nice addition. I've marked the issue as a possible enhancement.

concerning the documentation: in my eyes you should show how to initialize fullPage with the minimal needed code.

Noted! We'll improve the docs in the next release. Thanks! 👍

@alvarotrigo
Copy link
Owner

Docs improved!

@alvarotrigo
Copy link
Owner

Fixed on v4! 👍

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