Jump to content
Search Community

Importing 'Seamlessly loop elements along the x-axis' Helper Function

JustinNobles test
Moderator Tag

Recommended Posts

I am getting these warnings below when trying to import the 'Seamlessly loop elements along the x-axis' Helper Function  (draggable version) from the docs into my Angular 15 Project. I talked with an Angular Expert in a discord yesterday and we fixed all the errors I had caused on the Angular side. In my Angular project, I have an external js file where I copied/paste the function into, declared the external horizontalLoop function from the js file I created, and imported the gsap plugins in the component I am using. Was wondering what I need to do to remove this error below on the Greensock side. Do I need to buy the inertia plugin to fix these warnings for the loop to work as I was looking and saw the Helper Function example in the docs (draggable version) does use the inertia plugin in the codepen, if so that's not a problem for me, but I just would really like to incorporate this helper function into my project. Any help would be greatly appreciated

helperFunctionWarning.png

Link to comment
Share on other sites

Hi,

 

You can use that example without the inertia functionality, is not a must have.

 

Just be sure to import both the GSAP core and the Draggable Plugin in the file you have the horizontal loop and register the plugin as well:

https://stackblitz.com/edit/vitejs-vite-wuylgw?file=src%2Fhelpers%2FhorizontalLoop.js,src%2FApp.vue,src%2Fstyle.css&terminal=dev

 

Is not Angular but Vue is the closest to Angular that I can use 🤷‍♂️

 

Hopefully this helps.

Happy Tweening!

Link to comment
Share on other sites

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...