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

Add new section, rebuild fullpage and continue scrolling #1926

Closed
xho opened this issue Mar 26, 2016 · 4 comments
Closed

Add new section, rebuild fullpage and continue scrolling #1926

xho opened this issue Mar 26, 2016 · 4 comments

Comments

@xho
Copy link

xho commented Mar 26, 2016

Hi Alvaro,
first of all, thank you and compliments for this plugin.

This is just a question, since I am a bit confused about the build/destroy usage in my situation.
In my app I am adding new sections to the fullpage container progressively, it happens when you reach the last section: something like an infinite scroll, only a few section are loaded at start.

The problem is that I can't load and let the user stay where he is:

  • if I destroy and reinstantiate the navigation starts again from the first section
  • if I rebuild nothing happens (but maybe I simply misunderstood its usage)

Here is a fiddle:
http://jsfiddle.net/9L108quo/

So if I add a few sections the only possibility is to destroy and rebuild from scratch, losing your position. Is there an alternative? Or should I add an 'active' class to the last seen section before destroning and reinstantiate?

Thank you very much.

@alvarotrigo
Copy link
Owner

Here is a fiddle:
http://jsfiddle.net/9L108quo/

Your fiddle dones't have anything regarding your issue.

So if I add a few sections the only possibility is to destroy and rebuild from scratch, losing your position. Is there an alternative?

Not at the moment. I'll mark it as an enhancement for future versions.
If you really need it, contact me for an urgent request.

@xho
Copy link
Author

xho commented Mar 28, 2016

The fiddle was just en example of the situation, thank you very much for your answer.
By now I solved adding the class 'active' to the last seen section before reinstantiating Fullpage.

The app is a personal thing still in development, in case you're interested a draft is here:
fdf.xho.bedita.net
(it is in Italian, sorry, but the usage is quite intuitive)
You should have 10/15 sections loaded at start and then a progressive load when you reach the bottom.

Best, C_

[edit]
ps: i added fullpage in the list of used libraries in help page (open with the ? on the first page)

@ghost
Copy link

ghost commented Apr 18, 2016

@xho I had a look at your draft and wanted to comment on it regardless of your request, I hope you don't mind and most of all I hope you, @alvarotrigo don't mind.

I think it would be better from a user experience point of view to have the controls for scrolling the sections up or down not to scroll with the sections.

Meaning the controls should stay fixed at the top or bottom, left or right, while the section changes.

I was trying to do just that and use a fixed element for navigation while not hiding content under that fixed element that is taken from the document flow through its fixed property. So I have come up with a solution, though it is just a draft really, nothing more, you could surly improve on it. But it shows you what I mean regarding having the gallery controls (arrows in your case) at a fixed place.

@alvarotrigo
Copy link
Owner

Version 4 will detect DOM changes and update accordingly now!! 🥳

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