Jump to content
Search Community

Transforming DataGroup Contents?

smurfarita test
Moderator Tag

Recommended Posts

Hello,

 

I'm using a data group to render a collection of items. These items use a custom renderer to show an image and text. I'd like to be able to move/scale all of these items and to select multiple items at once but I am having trouble figuring out how to layout the MXML.

 

When I wrap my dataProvider with a transform manager I am unable to select each item individually for transformation. Clicking an item renderer selects all the items. Here is my sample MXML. Is there a different layout approach I should be using?

 

forceSelectionToFront = "false"

constrainScale = "true"

arrowKeysMove="true"

allowDelete="true"

width = "500"

height = "500"

/>

 

Link to comment
Share on other sites

Unfortunately, due to complexities in accommodating multiple selections, a TransformManager's items must all share the same parent (this is clearly stated on the site and in the documentation). You can create as many TransformManager instances as you want (one for each parent for example). But in your case, it looks like all your objects' parent is the DataGroup itself. Have you tried using a plain TransformManager (not FlexTransformManager) and then adding each of your DataGroup's children as items? I'm not optimistic about that because the Flex framework has plenty of Adobe-acknowledged bugs that may get in the way.

Link to comment
Share on other sites

Hmm, thanks for the idea I'll give it a shot and see what happens. You're right in the fact that the DataGroup is the parent in the sample I pasted below. I was trying to figure out a way I could insert a single FlexTransformManager within the dataGroup so that the ItemRenderer's will be the children. Unfortunately I'm brand new to MXML (coming from an AS background) and I'm just not sure what I want is possible. I was using a DataGroup originally for the convenience of data binding (so that the display would be updated as new items were added) it looks like it may be simpler to strip out the data group and manually manage the items in the TransformManager with AS and a few custom events.

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