Jump to content


Fit dragged object within dropzone

Moderator Tag
Go to solution Solved by GreenSock,

Recommended Posts


I've got a row with elements which can be dragged inside dropzones. All is working well but I can't get the dragged objects to fit exactly within the dropzone. Can someone point me in the right direction? 

Thanks in advance, 


See the Pen jOLxBEv by PMidd (@PMidd) on CodePen

Link to comment
Share on other sites

Hi peiterm,


You're going to need to calculate the difference, kind of like what is shown here.



  • Like 1
Link to comment
Share on other sites

  • Solution

For what it's worth, Club GreenSock members get access to Flip plugin which has a very convenient Flip.fit() method. 

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.