skinparam defaultTextAlignment center does not work on elseif boxes

0 votes
asked Dec 12, 2018 in Bug by Duncan

When using skinparam defaultTextAlignment center in an activity diagram (beta), it correctly centers text on if and else boxes, but not elseif boxes:

@startuml

skinparam defaultTextAlignment center

start

if (condition A \n or \n condition E) then (true)

:do something;

elseif (condition B)

:do something else;

endif

if (condition C \n or \n condition F) then (true)

:do something again;

else (false)

:do another thing;

endif

end

@enduml

commented Dec 13, 2018 by mgrol (3,150 points)
Hi,

I can confirm this.

The text alignment is correct when changing the elseif to else. Basically, the text alignment of the if box is wrong if the complete statement contains an elseif condition.

This is another example: http://www.plantuml.com/plantuml/uml/ZSw_aeCW40RmdgVOKeihxazrD7hd8rnv3J6BxWYB0-iaUViWCqxCfB617U3xyJL9J9J5EvKcujb4uw53QnOdVtYLrj707bcWpmj6LPuhib2HVUi3dqaeCBJ_31UICM-E64yHpLI3ZCXGtJ3L2k1xzU1TRs5q2P-CdwF6XyvZaZ2hOcJknVezQdrgXJbazwrsJdVK-TAb35GSP2GU7ZVhyVP9ATtaUV7k3W00

BR,

Michael
commented Dec 13, 2018 by albert (3,520 points)
Looks to me that in the example an `endif` is missing (doesn't solve the problem though).

1 Answer

0 votes
answered Dec 15, 2018 by plantuml (295,000 points)
Thanks for the report : this has been solved in last beta http://beta.plantuml.net/plantuml.jar

(and on the online server too)
...