Assume that I have a composite shape with a line as shown by the picture. When using the composite shape, I want both ends of the line to be connected to a rectangle for instance when users move the composite shape closed to the port of a rectangle, the line can be connected to that port. The problem I have with the composite shape, once the shape is composed, the line cannot be identified from that shape.
Is there a way to solve this problem without adding port to the line then draw a line to connect it to the rectangle.
I try to solve this problem by using a group, however when the line is rotated, the circle does not, so that make the group solution unsuitable
See the attached picture, what is the best way to solve this problem either using group or composite shape?