Element Alignment Tool Issue

Anyone noticed any issues with the Alignment menu tool used on model elements?
Align Left, Align Center, Align Top, Align Middle do not work as expected.
See image for example of issue.

Is this a bug in Capella 6.0? Or any other another known reason?

Examples shown is while working in SDFB, imported Functions and want to align them.

I’ve added in the diagram how I would expect the alignment to work.
Hope this makes sense.

Hi,

to me everything looks right.
The alignment deals with the marked elements among each other - not inside the surroundings.

Well, I agree with your point: “The alignment deals with the marked elements among each other - not inside the surroundings”, but still, I think when you choose “Align-Left” for example, it should find the selected element on the farthest left and align from this one.
Right now the behavior is to Align based on the last selected element. That’s my impression when I gave it a try.
Stephane

Thanks Stephane for checking.
I raised an Issue #2513 on the GitHub tracker.

Hi,

Indeed, the alignement tools are relative to the element that has black selection anchors. (the last three in your screenshot). It may be weird at first yes.

https://www.eclipse.org/sirius/doc/user/diagrams/Diagrams.html
Selected elements have an outline and anchors drawn on their border. Note that when a selection contains multiple elements, exactly one of them has black selection anchors; the rest have white anchors. The element with the black anchors is called the primary selection, and some tools treat it differently than the others (for example alignment tools).

Regards
Philippe

Hello Philippe,
Thanks for this helpful explanation on how it should work and the reference link. The alignment indeed seems to work based around the element with the black selection anchors.
In the example I’ve shown, the elements were pre-selected when added as functions, why the third from bottom element has the black anchor is not entirely clear to me.
Even if I clear the selection and reselect as a group by dragging a fence around the elements using the mouse cursor, this third from bottom element is selected with black anchors.
As a workaround, if I individually select the elements one-by-one and make note of the last selected element which then gets the black anchors, then the alignment can be done around this specific element. This individual selection of the elements may not always be possible if the elements are not all visible when first added to a diagram.
It is certainly peculiar how this alignment currently works. Maybe this could be a future improvement item to make the tool more intuitive in this regard. :slightly_smiling_face:

Hi,
When you have many elements selected, it is possible to choose the “black bordered one” by reselecting it with a shift+click.
aabc