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: how to update pin spacers #116

Closed
sulram opened this issue Jul 11, 2014 · 8 comments
Closed

question: how to update pin spacers #116

sulram opened this issue Jul 11, 2014 · 8 comments

Comments

@sulram
Copy link

sulram commented Jul 11, 2014

hello there, could you help me on this situation?
I have some scenes, and each of them have the same height of window, updated in every window.resize.
when I'm in the last scene (scrollbar at the bottom) and scale down the window, the pin spacer is not resized, and I get an extra space.
how can I update its height?
if I scroll up to the begining of the page and then go down to the last slide, it correct the pin spacer height.
is there a method for that?
I've tried controller.update(true), but nothing happens.
thank you very much

@krnlde
Copy link

krnlde commented Jul 12, 2014

despite its ambigous naming controller.update(true) is not made for this purpose. You'll have to update your height by reinitializing the values. See here #38 for reference

@janpaepke
Copy link
Owner

Hi Sulram,
I suspect you mean the duration of the scene is updated on window resize.
If pushFollowers is true for the pin, this should also change the spacer size automatically.
As Kai pointed out the .update method is only to update all scene states based on their current parameters.
If you can't figure it out please provide a jsfiddle showcasing your issue.

regards,
J

@janpaepke
Copy link
Owner

Any updates?

@sulram
Copy link
Author

sulram commented Jul 30, 2014

hello @janpaepke, yes, I was changing duration according to div´s height (changed in window.resize).

I was able to solve this problem by destroying and re-creating the scrollmagic instance on every window.resize event... not so good, but solved the issue

here is the link, but now, we removed the pins, so the problem is not hapening anymore
http://bit.ly/dobem330debug

anyway, maybe its a good idea to include a fix for that in the update method.

@janpaepke
Copy link
Owner

It really shouldn't be necessary to destroy and re-create on resize.
If it is, this is a bug.
Do you think you can create a simple jsfiddle isolating this issue? I'd be happy to sort it out...

@sulram
Copy link
Author

sulram commented Jul 30, 2014

ok, I will create the jsfiddle with the previous code and post here the link, talk to you soon! thanks

@janpaepke
Copy link
Owner

any updates?

@wokalek-work
Copy link

any updates?

any updates?

any updates?

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

4 participants