Jump to content
Search Community

Draggable has incorrect bounds

c-andrews 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

Hi,

 

I've got a strange issue occurring with the bounds of my draggable instance. Instead of the minY being 0 and maxY being the height of the container i get completely different values so i am unable to drag to the end and the beginning shoots off the screen.

 

It looks like the Draggable instance is calculating the bounds from the targeted element and not using the bounds.

 

I am applying a 3D transform to the "container".

Then adjusting the position of the child "content".

Then the I have the instance of the draggable element.

 

I have set it up this way so that i can control the Z axis easier for elements within the container. 

 

Can anyone help?

 

Thanks in advance,

Chris

See the Pen bpPMbE by c-andrews (@c-andrews) on CodePen

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...