In my Graphiti editor I have image figure and text label below that are nested in an invisible shape - this invisible shape holds these two components together. When I click anywhere is the figure - an outer invisible shape, and image or a text, the image is selected with a border around it. This signifies selection of the object.. I am doing this by overriding getSelection(PictogramElement pe, PictogramElement oldSelection) method in DesignerToolBehaviorProvider. This works well visually, however, when I select two or more shapes and try to align them, nothing happens - probably because alignment algorithm tries to align selected figures, but it can't because alignment happens in the context of outer invisible shape. Is there anything I can do to adjust alignment actions or do I need to rethink how I draw by figures?
Michael Wenz Messages: 1883 Registered: July 2009 Location: Walldorf, Germany
hm, this is a gap in Graphiti. The align actions are provided purily on GEF level, meaning GEF aligns the shapes that are selected. In your case that does not work. I see 2 option:
1) In Graphiti we need to wrap the GEF align actions and trigger the GEF alignment based on the right shapes. Not sure if that is possible and aboutr the involved effort. Please raise an enhancement bug in case you would like to have that, but I already have to state that probably not much will happen here due to our current lack of development capacity.
2) Remove teh GEF alignment actions and provide your own tool specific ones that implement the desired behavior.