Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Fedlarm

Wierd handle placement

Recommended Posts

Hi, I just ran into some wierd behavior regarding your TransformManager:

 

I am using Flex. Here is a some images of what im having trouble with:

Untitled-2.png

 

Now above could be worked around, however it starts to become a problem if I set LineScaleMode to None:

Untitled-1.png

 

The example is just af Group that in the updateDisplayList method draws a rectangle on its graphics instance. Normal behavior would be, that the handles would be on the center of the border. Here is the code from my class that does nothing but extending the class Group and this:

override protected function updateDisplayList(w:Number, h:Number):void
{
var g:Graphics = graphics;
g.clear();
g.lineStyle(2, 0xFF0000, 1, false, LineScaleMode.NONE);
g.beginFill(0xFFFFFF, 1);
g.drawRect(0, 0, w, h);
g.endFill();
}

Link to comment
Share on other sites

This issue has to do with bugs in Adobe's Flex framework, not TransformManager. When you put a border on an object, it throws off the values that get returned by getBounds(). I'm not aware of a workaround at this point, but if anyone else knows of one and can chime in, that'd be swell.

Link to comment
Share on other sites

Okay.. I've come to find it a good practice to use an overlay that only use simple objects and then i read the values on those simple objects and sets the scaleX/Y etc. values on the original components. The only functionality I loose is skewing of the objects. It works nicely this way.

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