umlmodelingstarumlcomponent-diagram

How to make a Port in a StarUML component diagram align on the left side?


I am trying to build a component diagram in StarUML. Unfortunately I am not able to align a port correctly on the left side. On the other sides it snaps on to the edge nicely. Do you know how? left one does not align correctly

I already tried to enable "move freely" in the preferences but it did not help.


Solution

  • This is an rendering bug in the software, caused by the upper left rectangles inserted into the old component shape.

    Here the result of the snapping a port on the 4 sides:

    Old shape, with 4 ports, the opne from the left misaligned

    If you select the component, you will see a blue selection rectangle surrounding the whole shape. The left port is precisely centered on the shape's border, except that this is not where le left border is drawn:

    Old shape, with 4 ports, the opne from the left misaligned, with a blue rectangle showing the selection

    You can easily work around this problem by changing the stereotype format of the component to "Decoration" or "Decoration with label". In this case, the component is displayed as a normal retangle with a small component icon in its upper right part. The border of the full shape and the border of the drawn retangle are the same. All the ports are then exactly as expected:

    Mordern component shape with fiull retangle and a component icon, all ports well aligned

    The setting can be changed shape by shape, right clicking on the component: Format > Stereotype display > ...:

    Screenshot of the menu path to change the shape setting

    You can also change the settings in your preferences, menu File > Preferences... > Submenu UML, and scrolling down to component:

    Screenshot of the preference setting dialogue