Jump to content
Search Community

Draggable with scale

tullem
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

Posted

Hey guys!

 

Great work on the Draggable util! I'm having one question though.. Is there a way to update my bounds? I'm working on a website with Draggable and want to update my bounds when I scale the view up to 500%. At this point I only want the div to be draggable partionally since the other content won't be relevant when zoomed in.

 

Is this possible?

 

Many thanks in advance!

Posted

First, please make sure you've got the latest version of Draggable - we released a major update last night with a bunch of enhancements and new features, one of which is the applyBounds() method. 

 

Have you tried changing the "bounds" property of your Draggable's vars? Like:

//assuming you already created your draggable with Draggable.create()...find the instance
var draggable = Draggable.get("#yourID");
draggable.vars.bounds = yourElement; //or whatever
draggable.applyBounds();
  • Like 1
Posted

Hi there GreenSock staff, thanks for the great Draggable plug-in!

 

I didn't want to start a new topic but here's my dilemma:

 

I'm appending input fields into the draggable elements, they fit in ok but I cannot type anything into the textfields. They get the focus event but that's it.

Is there something I should know, I'm guessing the Draggable plug-in somehow prevents the change event or whatever.

 

Edit: no focus event is fired, but the cursor changes into text-cursor when hovered over the inputs.

 

Thanks

Posted

Have you tried forcing the focus on click? I think that would do the trick..

 

Thanks for the update for the applybindings! I'll have a look at it this weekend :)

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