Param to center text in activity

+1 vote
asked Jun 22, 2016 in Wanted features by legz (510 points)

Hi,

Is it possible to have an option to center text in activities? (with a skinparam for exemple)

The goal is to obtain something like this :

Instead of this :

(without typing some spaces to mimic the centering :) )

1 Answer

+2 votes
answered Jun 22, 2016 by plantuml (134,510 points)
selected Jun 22, 2016 by legz
 
Best answer

Good idea!

With last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can now have:

@startuml
skinparam defaultTextAlignment center
start
:foo
very very very very long text;
end
@enduml


Thanks for the suggestion!
This has not been highly tested, so feedback is welcome.

commented Jun 22, 2016 by legz (510 points)
It seems to work like a charm on my diagrams, thanks!
commented Jul 4, 2016 by plantuml (134,510 points)
Note that this has been released in V8045
commented Jul 5, 2016 by legz (510 points)
It is working fine on V8045 in local, but not on the PlantUML server: http://www.plantuml.com/plantuml/uml/Aov9B2hXilB9pqjNA4cjA8d9oooEoG7ohBcAI_8B0000 (server is also in V8045)
commented Jul 5, 2016 by plantuml (134,510 points)
Do not forget to put
skinparam defaultTextAlignment center

You can try:

http://www.plantuml.com/plantuml/uml/AyxEp2j8B4hCLKX9JKiipIa9IQqeSSp9JC_BJSqhKKW64gb5NCKbYKKbN5O--Ndf2YL01J5vcSKnEK2UDL0glm00

Is this ok for you ?
commented Jul 5, 2016 by legz (510 points)
Oups, you're right, sorry for that.
Everything works fine, thanks!
...