Jump to content

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

Draggable on Aurelia

Recommended Posts

I am using Aurelia for a project and managed to get greensock working using the JSPM installation already available.

As part of that installation you also get draggable in the utils folder. 

I would love to use Draggable in the project but having difficulties loading getting it to load.

I realize that greensock is not ES6 compatible yet and that it may be in the future but I would love some advice on how I can possibly use Draggable in the aurelia project.


ps. I am using typescript.


One of the ways I tried to do it was just to copy the Draggable.js file into the source directory and include it as 

import './Draggable';

All my efforts to thus far gives me the runtime error that  is not found.


TweenMax works fine using

import 'greensock';

Just wish I could not include draggable.


Any suggestions?

Link to comment
Share on other sites

In your System config map you should have this...

"greensock": "github:greensock/GreenSock-JS@1.18.2",

Now add this...

"github:greensock/GreenSock-JS@1.18.2": {
  "TweenLite": "./TweenLite",

You should now be able to use it with this import.

import "greensock";
import "greensock/utils/draggable";

There are no TypeScript definitions for Draggable. Check out this post for more information.



Here's an set of definitions for Draggable that I've been working on. Let me know if you run into problems with them.


  • Like 4
Link to comment
Share on other sites

Excellent stuff ty for the reply, will definitely give it a try.

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.