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

Is there anyone who knows how to solve this problem? #803

Open
junhee0122 opened this issue Jun 21, 2018 · 1 comment
Open

Is there anyone who knows how to solve this problem? #803

junhee0122 opened this issue Jun 21, 2018 · 1 comment

Comments

@junhee0122
Copy link

junhee0122 commented Jun 21, 2018

It is a problem that happens in all browsers.
Before changing the window size it moves cleanly.
Change the window size while moving, the position will be shifted.
And, it has choppy. Tremble up and down as you can not click.
Is there anyone who knows how to solve this problem?

And sorry, my English. I used translator.

@keyranova
Copy link

I don't know if it affects performance or not, but I've destroyed/rebuilt scenes on resize in the past.

var controller = new ScrollMagic.Controller();

function yourScene() {
  return new ScrollMagic.Scene({
    offset: $('#header').offset().top
  }).setPin('#header')
    .addTo(controller);
}

var scene1 = yourScene();

$(window).on('resize', function() {
  scene1.destroy(true);
  scene1 = yourScene();
});

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

No branches or pull requests

2 participants