plantuml / plantuml-server

PlantUML Online Server
https://plantuml.com/
GNU General Public License v3.0
1.59k stars 463 forks source link

skinparam declaration depends on order #323

Closed kkrafft1999 closed 6 months ago

kkrafft1999 commented 6 months ago

Describe the bug skinparam ActivityBackgroundColor overrides skinparam ActivityDiamondBackgroundColor and skinparam ActivityBorderThickness overrides skinparam ActivityArrowThickness

If I change the order of the skinparam definitaion then it works, But it should make no difference how the skinparam definitions are ordered.

The-Lum commented 6 months ago

[Just for the record] See also plantuml/plantuml#1084

Perhaps use style instead.

Regards, Th.

The-Lum commented 6 months ago

Hi @kkrafft1999, and all,

Yes you have right. Thank for the report. But:

From:

@startuml
skinparam ActivityDiamondBackgroundColor red
skinparam ActivityBackgroundColor blue

skinparam ActivityArrowThickness 2
skinparam ActivityBorderThickness 1

if (counter?) equals (5) then
:print 5;
else 
:print not 5;
@enduml

To:

@startuml
<style>
activityDiagram {
  arrow {
    LineThickness 2
  }
  activity {
    BackgroundColor blue
    Thickness 1
  }
  diamond {BackgroundColor red}
}
</style>
if (counter?) equals (5) then
:print 5;
else 
:print not 5;
@enduml

[The order of diamond is always relevant!] 🙄


And FYI, see also:

Unfortunately, we won't fix issues in skinparam. Skinparam are still supported for very simple case (and for ascending compatibility) but we would like people to migrate to style instead. (The main reason is that code for skinparam is too old and not very well written).

On:


Enjoy, Regards, Th.

kkrafft1999 commented 6 months ago

Thank you @The-Lum , this works for me. :) Thanks for your help. Regards, Konrad.