Share Posted January 17, 2020 Hi, Hoping someone may have some insight into why I'm getting this type error. GSAP v3 itself is working great with Angular 8 and I'm enjoy many of the new features however I ran into a type error with Draggable on the create method: ERROR TypeError: _toArray is not a function at Function.create (Draggable.js:2612) Has anyone else run into this and know of a possible solution? I've tried all the different imports and the top declaration of Draggable but all of those work arounds were for GSAP v2 and don't appear to work here. Link to comment Share on other sites More sharing options...
Share Posted January 17, 2020 Without seeing a reduced test case, my best guess is that you just forgot to register Draggable. gsap.registerPlugin(Draggable); (Obviously do that before you actually use Draggable) Does that help? 2 2 Link to comment Share on other sites More sharing options...
Author Share Posted January 17, 2020 Thanks Jack! Sorry about that, I totally missed the register plugin feature, I guess when all else fails read the documentation.... Thanks again for an awesome platform! 1 Link to comment Share on other sites More sharing options...
Share Posted January 27, 2020 I have the same error in react "_toArray is not a function" https://codesandbox.io/s/dazzling-kirch-fof82 Link to comment Share on other sites More sharing options...
Share Posted January 27, 2020 10 hours ago, alxbot said: I have the same error in react "_toArray is not a function" Hey alxbot. You must do what this thread says to do - register Draggable. gsap.registerPlugin(Draggable); However, you're not even loading GSAP in that demo. Import that as well and it works: import { gsap } from "gsap"; 1 Link to comment Share on other sites More sharing options...
Share Posted January 28, 2020 On 1/27/2020 at 9:21 AM, ZachSaucier said: Hey alxbot. You must do what this thread says to do - register Draggable. gsap.registerPlugin(Draggable); However, you're not even loading GSAP in that demo. Import that as well and it works: import { gsap } from "gsap"; Yes It works, im so noob . Thank you so much 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now