Jump to content
GreenSock

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

[Bug] The selection shifts

Recommended Posts

Hi there,

 

The following problem comes to me and I can't create a simple test for reproduce the bug :

 

post-1919-133151999666_thumb.png

post-1919-133151999672_thumb.png

post-1919-133151999678_thumb.png

 

The current DisplayObject :

 

	horizontalScrollPolicy="off" verticalScrollPolicy="off">






















	angle='45' blurX='4' blurY='4' distance='4' alpha='0.4' color='#000000' knockout='false' quality='1'
	strength='1' inner='false' hideObject='false'/>









				/* Here is my image, the canvas content auto ajust */
				/* a replacement with an mx:Button don't change anything */








 

Thanks in advance

Link to comment
Share on other sites

It'd be SUPER helpful if you'd zip up a simplified Flex project that clearly demonstrates the issue and send it directly to me via e-mail or private message. When I pasted your code into Flex, it kept complaining "Initializer for property 'states' is not allowed here". I've got a lot on my plate at the moment and don't have much time to try building something that reproduces the problem (TransformManager seems to work great for me and nobody else has complained about a similar issue), so your help would be greatly appreciated.

Link to comment
Share on other sites

I have passed lot of time to isolate this problem. Finnaly I found this, It's because the root canvas has a yellow border.

 

I have created a simple flex project example. I will send you email.

Thanks

Link to comment
Share on other sites

Yep, looks like yet another bug in the Flex framework. It doesn't accurately perform globalToLocal() on a canvas with a border (it offsets things by the thickness of the border). You can see proof with this simple MXML:

 


<br>			import mx.containers.Canvas;<br><br>			public function doMain():void {<br><br>				var redReg:Point = red.parent.globalToLocal(red.localToGlobal(new Point(0, 0))); //just translates the origin of the red box into the coordinate space of its parent where we'll position the green box.<br><br>				//now position the green box directly over the red box (you'll see that it's actually offset by however thick the border of the parent is (which is a bug in Flex)<br>				green.x = redReg.x;<br>				green.y = redReg.y;<br><br>			} <br>		]]><br>


 

If you've got any ideas on how to elegantly work around the Flex bug, let me know. I'm not interested in littering my code with a bunch of conditional logic to accommodate a Canvas border, though, especially because it seems to be an obvious bug in the framework that Adobe will hopefully fix on the next rev of Flex.

Link to comment
Share on other sites

  • 4 months later...
If you've got any ideas on how to elegantly work around the Flex bug, let me know.

 

I have a similar problem when I put a border on the FlexTransformManager. I too am looking for a work-around for this bug.

 

borderproblem.jpg

 

Thanks Much,

Mark

Link to comment
Share on other sites

Again, this is a bug in Flex, not TransformManager. I'd recommend avoiding borders and instead, apply them manually with a Shape or something. You'd get the same effect visually, but without the bug.

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