Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

mark.statkus

BusinessGreen
  • Posts

    4
  • Joined

  • Last visited

About mark.statkus

Recent Profile Visitors

563 profile views

mark.statkus's Achievements

6

Reputation

  1. mark.statkus

    GSAP + Angular

    Any one else getting here late like I did @ZachSaucierwas totally on point. v3 updates covered - (I was a go-fast victim and didn't read the instructions)
  2. Thanks I needed this too after swinging back to gsap v3 update. I dig it!
  3. mark.statkus

    GSAP + Angular

    @ZachSaucierconfirmed! Thanks, I'll get rid of the extra import.
  4. mark.statkus

    GSAP + Angular

    For anyone using Angular 10, I had issues with importing TweenMax/Lite or Timeline. Went with gsap and then it worked. *.component.ts import { gsap, Power3 } from 'gsap'; import ScrollToPlugin from 'gsap/ScrollToPlugin'; Add to constructor: gsap.registerPlugin(ScrollToPlugin); // Register ScrollTo plugin And then for Scroll I added a scrollTo method: scroll(event: any, el: HTMLElement) { event.stopPropagation(); const topY = el.getBoundingClientRect().top; gsap.to(window, 1, { scrollTo:{ y: el, offsetY: 5, autoKill: true }, ease: Power3.easeOut }); } Note: the topY thing didn't workout, just passed in the element and then it worked great. *.componenet.html <a class="page-scroll link-underline-menu" (click)="scroll($event, about)" href="#about">About</a>
×