How to stop classes out of a package to pull classes inside package when related?

0 votes
asked Dec 23, 2021 in Question / help by Cunami

Hi everyone, I have tried multiple approaches for my issue but could not find a solution, hope someone can help me.

The best way to explain my issue is via a "actual - expected" example. The first image is how it currently is and the second is how I would like it to be.

So here is the how it currently is:

You notice how Top "pulls" A to the right and B to the left. I would like them to stay centered in the package as in the example below where I just removed the connection.

Thank you in advance.

commented Dec 23, 2021 by albert (3,180 points)
So when I interpret the images correctly you would like to have "A" and "B" be centered in "P1" and "P2" and not evenly distributed (so on 1/3-rd and 2/3-rd) of the line. And have "Top" still in the middle of the line.

1 Answer

0 votes
answered Dec 23, 2021 by Martin (8,280 points)
Best answer

Not a brilliant answer I'm afraid, but you can add in some dummy padding classes and then hide them:

A -left- dummyA1
A -right- dummyA2
hide dummyA1
hide dummyA2

And the same for B

(click diagram for online server)