Jump to content
Search Community

Restrict scaling issue on re-selection.

morganwill test
Moderator Tag

Recommended Posts

Hi - really liking the TransformManager so far.


One thing I'm seeing which is an issue for us, is when setting the setScaleConstraints() or minScale() / maxScale() everything works fine until you select another object, then return to the original object and try to re-scale once again. Simply uncommenting the flex demo code, and making it as below, will re-produce the issue:


var item:TransformItem = myManager.getItem(image1);
item.setScaleConstraints(0.5, 1, 0.5, 1); //impose scale limits				

item = myManager.getItem(myTextArea);
item.constrainScale = true; //cause image2 to scale proportionately when interactively scaling it	
item.setScaleConstraints(0.5, 1, 0.5, 1); //impose scale limits


You'll notice that you cannot re-size myTextArea larger after 1) re-sizing smaller, 2) de-selecting and then 3) re-selecting.


Is there a work around for this? This is very important to our application.


Many thanks,



Link to comment
Share on other sites

That's actually an issue related to how a TextArea reports its scale. It's not a TransformManager bug. Let's say you have a TextArea that's 200x200 and then you set the width to 100 (which is 0.5 scale). If you trace() the scaleX, you'll notice that it reports as 1! Again, that happens regardless of whether or not you're using TransformManager.


You can set a minWidth/maxWidth and minHeight/maxHeight instead which should work around the issue.

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