Jump to content
Search Community

Does Draggable only work with DOM elements? Can I get it in a canvas-based app ?


GreenSock test

Yes, Draggable is just for DOM elements. But the real magic behind all the fluid motion and snapping is InertiaPlugin, and that can be used to tween any property of any object, not just DOM elements. So yes, you can absolutely get this kind of motion in other contexts but you'd need to wire up the actual dragging logic yourself and then fire off an InertiaPlugin tween when the user releases their mouse/touch. InertiaPlugin can even track the velocity of any property for you too (even function-based getters/setters!), so it's quite a powerful tool.





×
×
  • Create New...