Jump to content

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

moving around the canvas effect with draggable

Recommended Posts

Hi, guys! I'm wondering if there is a way to move an element without the need to hover the cursor on the draggable element?

Thank you!

See the Pen ExPvXga by PavelLaptev (@PavelLaptev) on CodePen

Link to comment
Share on other sites

Hey Powel and welcome to the GreenSock forums!


With Draggable it's as simple as setting a trigger to the element that you want to control the drag and setting the cursor to "auto":

See the Pen bGErMjd?editors=0010 by GreenSock (@GreenSock) on CodePen


You could even give it some momentum by using GSAP's InertiaPlugin if you'd like :) 

See the Pen abdyGjq?editors=0010 by GreenSock (@GreenSock) on CodePen


Happy tweening.

  • Thanks 1
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.