Roassal3 icon indicating copy to clipboard operation
Roassal3 copied to clipboard

Need better way to lookup shapes from models

Open bergel opened this issue 5 years ago • 5 comments

in particular to cope with composite shapes

bergel avatar Sep 11 '20 22:09 bergel

I think this issue is related to this pull request from Massimo https://github.com/ObjectProfile/Roassal3/pull/273

akevalion avatar Sep 14 '20 23:09 akevalion

Is this issue still valid?

akevalion avatar May 12 '21 18:05 akevalion

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.

bergel avatar May 14 '21 20:05 bergel

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

bergel avatar May 14 '21 20:05 bergel

Very similar to issue #279

bergel avatar May 14 '21 20:05 bergel

users should use deepShapeFromModel:

akevalion avatar May 30 '23 11:05 akevalion