Center disalignment when using "HorizontalAlignment center"

+1 vote
asked Mar 29 in Bug by eduardomozart (180 points)

Hello, I'm using the following code to generate a WBS diagram:


node {
    HorizontalAlignment center
    LineColor blue
    BackgroundColor white
    MinimumWidth 115

arrow {
    LineColor grey

* Técnicas de Escaneamento\nCibernético
** Open Scan
** Half Open Scan
*** Version\nDetection Scan
** Stealth Scans
*** SYN|ACK Scan
*** IDLE Scan
*** FIN, XMAS, NULL\nScans
*** ACK Scan
*** Window Scan
*** TCP\nFragmentation\nScan
** Sweep Scans
*** ICMP Echo\nScan
*** ICMP\nTimestamp &\nAddress Mask\nScan
*** TCP SYN Scan
** Miscellaneous Scans
*** FTP Bounce\nScan
*** UDP Scan
*** IP Protocol\nScan
*** RPC Scan

When using "HorizontalAlignment center", some items do not seems to be centered right. The "Miscellaneous Scans" appears to be right aligned and some items like "Window Scan", "RPC Scan" and others do not seems to be centered at all.

commented Mar 29 by The-Lu (44,040 points)
edited Apr 7 by The-Lu

Hello PlantUML team and all,

It seems a artefact regression form correction of:

Then compare, this:


Thanks for your correction.

1 Answer

0 votes
answered Apr 7 by danespin (140 points)
No, it's not related to the mentioned artefact.

The center bug in HorizontalAlignment is real, it puts the strings to the right instead.

You can test it with the example of section 17.10 of the latest PDF guide.

Here it is:

commented Apr 7 by The-Lu (44,040 points)

Hello D.,

In fact `artefact ` is not a good word...
I was thinking more of `regression form correction of`, I just correcting the sentence...

And here is the image of your example:

If that can help PlantUML team for correction...

commented 2 days ago by anonymous

Reverting to release v1.2022.1 resolves the issue so the bug was likely inadvertently introduced whilst trying to fix issue #15441.

Hope that's helpful.