Jump to content
Search Community

GSAP and Locomotive Scroll: Casued extra scroll! [FIXED!]

momo12 test
Moderator Tag

Go to solution Solved by momo12,

Recommended Posts

Guys I have a quetion

 

I used Locomotive scroll and GSAP scroll Proxy but it casues extra scroll. This only happens with Mouse wheel and not the scroll-bar!

 

 

gsap.registerPlugin(ScrollTrigger);
const locoScroll = new LocomotiveScroll({
  el: document.querySelector(".content-wr"),
  smooth: true
});

ScrollTrigger.scrollerProxy(".content-wr", {
  scrollTop(value) {
    return arguments.length ? locoScroll.scrollTo(value, 0, 0) : locoScroll.scroll.instance.scroll.y;
  }, 
  getBoundingClientRect() {
    return {top: 0, left: 0, width: window.innerWidth, height: window.innerHeight};
  },
  pinType: document.querySelector(".content-wr").style.transform ? "transform" : "fixed"
});

 

Link to comment
Share on other sites

  • momo12 changed the title to GSAP and Locomotive Scroll: Casued extra scroll! [FIXED!]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...