I use ICreateService.createInvisibleRectangle() to house shapes of my diagram and more specifically to put anchors on this rectangle. In doing so these rectangles become part of the diagram and thus can be selected. Is there a way to make them behave like regular rectangles but still be inactive? More specifically they participate in layout, but cannot be selected. If I set PE for this rectangle as inactive, then it does not participate in layout and thus my shapes are not positioned correctly.
Perhaps I am not aware of some implementation that already exists. My end goal is to be able to put anchors where they appear now - relative to the outer shape, but I haven't found a way to do it without using invisible rectangles. If I set anchor's parent the immediate outer shape, then anchor cuts off when it's positioned at the center of the outer shape's border.
Michael Wenz Messages: 1883 Registered: July 2009 Location: Walldorf, Germany
you can influence what is being makred as selected when you click on a
shape/graphics algorithm. Override getSelection in your tool behavior
provider and return the root rectangle (or whatever you like) when the user
clicks in the invible rectangle for the anchor.