Jump to content
Search Community

Not able to toggle constrainScale

terjeruuda test
Moderator Tag

Recommended Posts

Hi!

 

First... GreenSock, I really admire your work!

 

So why this post? I'm building a simple crop tool for a client, and they've demanded an option where the user can toggle between constraining aspect ratio or not.

So I have a checkbox to toggle between aspect ratio or not...

 

The checkbox is checked (aspect ratio is on), and I can drag the transformManager with aspect ratio. I turn of aspect ratio, and now I don't have aspect ratio. Everything works fine.

I then turn aspect ratio on again. And yeah, I have a minimum size for the selected item, and what's supposed to happen is that when I decrease/scale down the manager it would stop at the minimum size.

 

What happens is that either the box grows very fast either in x or y direction. What am I doing wrong?

Link to comment
Share on other sites

Sorry to hear about the trouble - I'm on a family vacation all week and will need to look into this when I return next week (my apologies for the delay). Nobody else has reported problems like this, but that certainly doesn't mean there isn't a bug somewhere. I just don't have time at the moment to dig into the code. Stand by...

Link to comment
Share on other sites

Hi!

 

No rush. I have come up with a temporary solution. Everytime I turn on aspect ratio, I just make a new manager and remove the old one.

But it sure would be nice to use a method instead.

 

You should certainly enjoy your family vacation. :)

Link to comment
Share on other sites

  • 2 weeks later...

I just posted version 1.92 which I believe fixes this issue. Please snag the latest version from your GreenSock account at http://www.greensock.com/account/ and let me know if it works well for you. I also added new minWidth, maxWidth, minHeight, and maxHeight properties to TransformItem.

 

Thanks for letting me know about the issue and for being patient for the permanent solution.

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