Jump to content
Search Community

Resizeable using GSAP?

cormack 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

Excuse me if i am asking something so naive.

 

It is possible (using GSAP features) to use not only draggable but resizeable (not just in one corner, but resizeable in more than one direction)?

 

Thanks in advance

 

Link to comment
Share on other sites

Hello And welcome to the GreenSock forum!

 

Im not near my computer right now, but the below examples should lead you in the right direction.

 

Here is an example from jamiejefferson

 

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

 

And here is one i made so the image resizes with aspect ratio preserved.

 

See the Pen LEqLbO by jonathan (@jonathan) on CodePen

 

And one by Blake constraining the draggable parent:

 

See the Pen EaXNMd by osublake (@osublake) on CodePen

 

Just fork the above examples in codepen and modify it to your needs to resize from all for corners.

 

:)

  • Like 4
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...