How to Combine !pragma useVerticalIf on and !pragma useVerticalIf off ?

0 votes
asked Oct 25, 2022 in Question / help by kasra (1,000 points)

Hi,

@startuml
!pragma useVerticalIf on
start
if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
  :Text 2;
  stop
elseif (condition C) then (yes)
  :Text 3;
elseif (condition D) then (yes)
  :Text 4;
else (nothing)
  :Text else;
endif

!pragma useVerticalIf off

if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
  :Text 2;
  stop
elseif (condition C) then (yes)
  :Text 3;
elseif (condition D) then (yes)
  :Text 4;
else (nothing)
  :Text else;
endif
stop
@enduml

 !pragma useVerticalIf off overrides !pragma useVerticalIf on

Best Regards,

Kasra

1 Answer

0 votes
answered Oct 26, 2022 by kasra (1,000 points)
Hi,

You are right they are similar.

I just hope every 6 months ;-) but It seems that I am the only one who thinks that It would be a great feature.

Best Regards,

Kasra
...