Jump to content
Search Community

Migrating a demo to the latest version

Lighton test
Moderator Tag

Recommended Posts

Hi hope you can help,
 

A lot of examples are in older versions.  My current task is to see how easy it is to upgrade the domos that would be useful to us.  

See the Pen YPvdYv by GreenSock (@GreenSock) on CodePen

I've read the migration docs and I thought that I was already there.  But my pen seems very temperamental, after the first few drags, its all over the place. 



Thanks in advance for your consideration, D.

See the Pen NWyRBXN by carty (@carty) on CodePen

Link to comment
Share on other sites

Welcome to the forums @Lighton

 

Your conversion seems fine, but I think you might have stumbled upon a bug. When it messes up, the press init x value is different than the press value, causing it to jump. Please standby while we investigate.

 

See the Pen NWyRoXJ by GreenSock (@GreenSock) on CodePen

 

8 hours ago, Lighton said:

I've read the migration docs and I thought that I was already there.

 

Also check out the part about Getting an object's properties. You'll need to do that for all the _gsTransform stuff in that applySnap function.

 

Link to comment
Share on other sites

Its really good, but due to ridiculous deadline, we will have to use our own drag component, to begin with.  Its no way as good and doesn't support scroll, but it does support resize.  So two questions:

1. Is there a standard approach to resize GSAP draggable? I.E. one that works with both mouse and keyboard.  I've seen a few threads, on the forum, with resize working, but only with mouse. 
2. When will the new version of draggable be released?

Only spent a few hours yesterday playing with GSAP, so excuse my limited knowledge.  Best D.

Link to comment
Share on other sites

2 minutes ago, Lighton said:

1. Is there a standard approach to resize GSAP draggable? I.E. one that works with both mouse and keyboard.  I've seen a few threads, on the forum, with resize working, but only with mouse. 

I don't understand the question - Draggable simply makes something Draggable. It's unrelated to resizing. Are you saying you want to resize the Draggable element itself and then make sure the bounds are applied appropriately or something? A minimal demo will go a long way to getting you a good answer. 

 

4 minutes ago, Lighton said:

2. When will the new version of draggable be released?

We can't guarantee anything at this point. You're welcome to use that beta version if you'd like - you don't have to wait for the official release. I'd guess that the new version will likely be released in 2-4 weeks. We're working on several other enhancements and it's hard to know exactly when those will be ready. 

Link to comment
Share on other sites

Hey Jack,
So, to be clear.  The minimum demo is your last revision.  This is the one that uses draggable beta: 

See the Pen bGLwZvE by GreenSock (@GreenSock) on CodePen

 

That is the starting point.  
1. My objective is to enhance this by allowing the element to be resized whilst keeping it constrained within its bounds.  So, the exact demo, but resizable. 
2. As most of our customers use touch, touch and mouse are required.
3. Do you have an example or how would you approach this?  
Thanks in advance. D.

Link to comment
Share on other sites

I don't see why it wouldn't be possible. I don't have an example for you, no, but go ahead and give it a shot and then if you run into a GSAP/Draggable-specific question we'd be happy to help. These forums aren't really for "here are my list of requirements...please show me how to build it" consulting services (please read the forum guidelines) but we love helping with questions about the API or things like that. 

 

Good luck!

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