| v lbls es e1 e2 a1 a2 layout stepping|
v := RTView new.
lbls := RTLabel new elementsOn: #(#First #Second).
es := RTEllipse new
size: 30;
borderColor: Color black;
elementsOn: #(#source #dest).
v
addAll: lbls;
addAll: es.
es @ RTDraggable.
es @ RTLabeled.
e1 := RTArrowedLine new
withContinuousCircleAttachPoint;
color: Color black;
edgeFrom: es first to: es second.
v add: e1.
e2 := RTArrowedLine new
withContinuousCircleAttachPoint;
color: Color black;
edgeFrom: es second to: es first.
v add: e2.
a1 := RTAnchorConstraint new.
a1 anchorShape size: 10.
a1 guideLine color: Color red.
a1
element: lbls first;
edge: e1;
balance: 0.2;
minDistance: 10;
build.
(a2 := RTAnchorConstraint new)
element: lbls second;
edge: e2;
balance: 0.2;
minDistance: 10;
build.
layout := RTForceBasedLayout new
charge: -450; length: 100;
doNotUseProgressBar; applyOn: es; yourself.
layout initialLayout: RTSugiyamaLayout new.
stepping := RTSpringLayoutStepping new
view: v; layout: layout;
afterBlock: [ v canvas camera focusOnCenter].
v addAnimation: stepping.
^ v
I've just commited RTAnchorConstraint to latest Roassal, see class-side example there.
I have been trying it, and there is a first version that works now, thanks!
I even have a bug report for you … before, when I removed the edge, the label was also removed automatically. Now this is no longer the case. :-(
_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.chhttps://www.list.inf.unibe.ch/listinfo/moose-dev