Hi!
Just to make sure I have not missed anything. You told me on discord that you fixed the
problem, don’t you? What is your solution?
Cheers,
Alexandre
On Aug 29, 2018, at 10:35 PM, Hernán Morales Durand
<hernan.morales(a)gmail.com> wrote:
Hi Alex,
My problem using labeled elements is that adding another box, labeled text gets
overlaped:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view shapes myElems |
view := RTView new.
myElems := 1 to: 3.
shapes := (RTSVGPath new
path: 'm 3.96875,9.2604167 h 31.75 V 25.135417 C 22.489583,23.8125
17.197917,34.395833 3.96875,27.78125 Z';
fillColor: Color red;
borderColor: Color black;
borderWidth: 1.2;
scale: 1.4) elementsOn: myElems.
view addAll: shapes.
shapes @ (RTLabeled new text: 'Long text message').
RTEdgeBuilder new
view: view;
shape: (RTArrowedLine new
color: Color black;
yourself);
elements: shapes;
connectFrom: 1 to: 3.
RTTreeLayout new
verticalGap: 30;
horizontalGap: 30;
applyOn: shapes.
view inspect.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Maybe another suggestion?
Cheers,
Hernán
2018-08-29 22:09 GMT-03:00 Alexandre Bergel <alexandre.bergel(a)me.com>om>:
Hi!
An easy thing to do, is to make the elements labeled. Which is different than creating a
composite shape (I can detail why there are two ways to label elements).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view shapes myElems |
view := RTView new.
myElems := 1 to: 2.
shapes := (RTSVGPath new
path: 'm 3.96875,9.2604167 h 31.75 V 25.135417 C 22.489583,23.8125
17.197917,34.395833 3.96875,27.78125 Z';
fillColor: Color red;
borderColor: Color black;
borderWidth: 1.2;
scale: 1.4) elementsOn: myElems.
view addAll: shapes.
shapes @ (RTLabeled new text: 'hello').
RTEdgeBuilder new
view: view;
shape: (RTArrowedLine new
color: Color black;
yourself);
elements: shapes;
connectFrom: 1 to: 2.
RTTreeLayout new
verticalGap: 30;
horizontalGap: 30;
applyOn: shapes.
view inspect.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Here is the result
<Screenshot 2018-08-28 15.32.19.png>
Cheers,
Alexandre
On Aug 23, 2018, at 2:31 PM, Hernán Morales
Durand <hernan.morales(a)gmail.com> wrote:
Hi,
When connecting two composite shapes with RTEdgeBuilder, the connector
position loose its center over the connecting shapes.
It's easier to explain with two scripts:
This one looks good, the connector (RTArrowedLine) is centered:
| view shapes myElems |
view := RTView new.
myElems := 1 to: 2.
shapes := (RTSVGPath new
path: 'm 3.96875,9.2604167 h 31.75 V 25.135417 C 22.489583,23.8125
17.197917,34.395833 3.96875,27.78125 Z';
fillColor: Color red;
borderColor: Color black;
borderWidth: 1.2;
scale: 1.4) elementsOn: myElems.
view addAll: shapes.
RTEdgeBuilder new
view: view;
shape: (RTArrowedLine new
color: Color white;
yourself);
elements: shapes;
connectFrom: 1 to: 2.
RTTreeLayout new
verticalGap: 30;
horizontalGap: 30;
applyOn: shapes.
view inspect.
However when adding a label in a composite, both label and arrow looks shifted:
| view shape shapes myElems |
view := RTView new.
myElems := 1 to: 2.
shape := RTCompositeShape new
add: (RTLabel new text: 'Test');
add: (RTSVGPath new
path: 'm 3.96875,9.2604167 h 31.75 V 25.135417 C
22.489583,23.8125 17.197917,34.395833 3.96875,27.78125 Z';
fillColor: Color red;
borderColor: Color black;
borderWidth: 1.2;
scale: 1.4);
vertical;
yourself.
shapes := shape elementsOn: myElems.
view addAll: shapes.
RTEdgeBuilder new
view: view;
shape: (RTArrowedLine new
color: Color white;
yourself);
elements: shapes;
connectFrom: 1 to: 2.
RTTreeLayout new
verticalGap: 30;
horizontalGap: 30;
applyOn: shapes.
view inspect.
Any idea how to align these shapes?
Cheers,
Hernán
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
<Align_Test2.png>_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev