"Click through" an unfilled RoundedRectangle [message #1070795] |
Thu, 18 July 2013 17:35 |
|
Hi all,
I have a ContainerShape for which I create an unfilled RoundedRectangle. This is used to group other shapes together visually such that when the group shape is moved, any shapes that are completely contained by the group shape are moved along with it. I've also arranged to always keep the group shape at the top of the Z-order so that it can't be obscured by any other shapes (a requirement).
The move feature works, but now I'm unable to "click through" the group shape to any of the contained shapes. Also, the mouse hit test does not find any of the contained shapes because the group shape is the first one it finds, thus none of the context buttons appear for the contained shapes. Is there a way to do this without having to create a PolyLine instead of a RoundedRectangle? Ideally what I'd like is to have the group shape pass all mouse hits down to contained shapes, but not down to the Diagram.
Thanks in advance,
Bob
|
|
|
|
Re: "Click through" an unfilled RoundedRectangle [message #1070840 is a reply to message #1070810] |
Thu, 18 July 2013 20:01 |
|
OK, this is working but there's one little problem remaining:
The ContextButtonManagerForPad does not do the same translation as the ShapeEditPart does in its getTargetEditPart() method, so the context button pad being displayed is always the one for the group shape, not the contained shapes.
Is it possible to add a call to DefaultToolBehaviorProvider.getSelection() in ContextButtonManagerForPad.showContextButtonsInstantly() (or somewhere in that "mouse entered" listener call chain)?
Please let me know if I should create an enhancement request BZ.
Thanks,
Bob
|
|
|
|
Re: "Click through" an unfilled RoundedRectangle [message #1073710 is a reply to message #1073275] |
Thu, 25 July 2013 10:46 |
|
Hi Michael,
Thanks for the hint, but I need to be able to move the inner shapes into and out of the Group shape so disabling their Move Feature is not an option. I've also run into a couple of other problems with this solution, unrelated to Graphiti.
I finally decided to use a Polyline GA for the Group shape and changed its Move Feature to adjust the locations of the contained shapes in postMove() by invoking their Move Features.
Bob
|
|
|
Powered by
FUDForum. Page generated in 0.02810 seconds