Jump to content
Search Community

Resizeble on GSAP V3.5.1

Yandex.Technologies LLC test
Moderator Tag

Recommended Posts

Greetings, dear community!

I have some issue with super-draggable-resizeble example from @Sahil when use new version of GSAP - 

 

 

Just look at right side, when resize by drag left size.

I try to use gsap.quickSetter, but the result is similar...

 

Some ideas how to fix that? :)

 

ezgif.com-video-to-gif.gif

See the Pen wvGPWwE by belyanskii (@belyanskii) on CodePen

Link to comment
Share on other sites

3 minutes ago, ZachSaucier said:

Adding a Math.round in the updateLeft x calculation seems to fix it:


function updateLeft() {
  gsap.set($container, {
    width: "-=" + leftDraggable[0].deltaX,
    x: "+=" + Math.round(leftDraggable[0].deltaX)
  });
}

 

 

Yes, it's really better with rounding!

I wonder why the previous version didn't require this 🤔

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