Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Centering in swimlanes

0 votes
I'm using a vertical swimlane, and I want to center elements relative to the vertical center (y-axis) of the column I'm in. I can select the column, but once it's selected I can't select anything else, so I can't use the align horizontal command.

Right now I have the grid on and I'm eyeballing it, but there has to be a better way to do this. Ideally I'd like to arrange it so I can change the column width and the element stays centered directly under the label.

Aligning an element with the horizontal (x-axis) would be nice too.

Is there some way to do this?

Thanks in advance.
in Feature Requests by (160 points)
recategorized by

2 Answers

+1 vote
Best answer
The use of temporary nodes as jigs or templates can help with alignment in yEd.

To center nodes within a vertical swimlane, create a temporary rectangular node that you have adjusted to match the width of the swimlane.  Just add a simple rectangle to the swimlane, stretch it to touch both sides of the lane, and reduce the height if needed to avoid other nodes in the lane.

Select all nodes in the swimlane including the temporary rectangle.  Align the nodes horizontally.

With all of the nodes still selected, drag the set of nodes left or right until the temporary node again touches both sides of the lane.  Deselect all nodes.  Delete the temporay node.  The nodes are now centered in the swimlane.

This takes a few more steps than simply aligning horizontally, but quickly achieves the desired result.
selected by
Good idea. I play games like this in CSS to align things on web pages. Hopefully the powers that be add this as a supported feature.
0 votes
Aligning nodes within a swimlane's column is currently not supported, I'm afraid.
I have changed your question into a feature request.
by [yWorks] (23.7k points)
Legal Disclosure | Privacy Policy