Jump to content
Search Community

Resize a draggable

squashed test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I am attempting to resize a draggable DOM. As in the user can select an edge of the DOM and drag it to a new size.

 

Is this something that GSAP is designed to handle or am I on the wrong track? jQueryUI 'resizable' doesn't really work with a draggable (or I haven't yet been able to get it to work).

 

 

Link to comment
Share on other sites

You're right, the resizing you describe is not a built-in functionality provided by GSAP Draggable.

 

If you take a look at

See the Pen qLAwj by jamiejefferson (@jamiejefferson) on CodePen

, you can see a method that gets GSAP Draggable and jQueryUI Resizable working together. The trick is in this line, that prevents the resize and drag from happening at the same time:

$('.ui-resizable-handle').attr('data-clickable', true);
  • Like 6
  • 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.
×
×
  • Create New...