Need better way to lookup shapes from models
in particular to cope with composite shapes
I think this issue is related to this pull request from Massimo https://github.com/ObjectProfile/Roassal3/pull/273
Is this issue still valid?
Consider the following code:
canvas := RSCanvas new.
outerShapes := RSComposite models: #(10 20) forEach: [ :s :nb |
s add: (RSCircle new color: Color blue; model: (nb + 1)).
s @ RSPopup.
s
].
outerShapes do: [ :ss | ss padding: 3 ].
outerShapes @ RSPopup @ RSDraggable.
outerShapes color: Color veryLightGray.
canvas addAll: outerShapes.
RSFlowLayout on: outerShapes.
lb := RSLineBuilder line.
lb withBorderAttachPoint.
lb canvas: canvas.
lb shapes: (canvas deepShapesFromModels: #(11 21)).
lb connectTo: [ :nb | nb + 10 ].
canvas zoomToFit.
The line builder should have a configuration flag, maybe deepSearch, to look for the inner nodes.
We could have a RSTDeepSearch that is used by RSTContainer and RSGroup. But there is privateNodes and privateEdges that must only use children / shapes. Currently it is messed up
Very similar to issue #279
users should use deepShapeFromModel: