Anchor Point relative to another Anchor point

0 votes
asked May 3, 2021 in Wanted features by Serge Wenger Work (15,620 points)

Hello,

It would be useful to be able to define an anchor point relative to another anchor point:

@startuml
clock clk with period 1
binary "enable" as EN
concise "dataBus" as db

@0 as :start
@5 as :en_high 
@10 as :en_low
@en_high-2 as :EnHighMinus2
@:start
EN is low
db is "0x0000"

@:en_high
EN is high

@:en_low
EN is low

@:EnHighMinus2
db is "0xf23a"

@:en_high+6
db is "0x0000"
@enduml

1 Answer

0 votes
answered May 14, 2021 by plantuml (294,960 points)
selected May 15, 2021 by Serge Wenger Work
 
Best answer

Actually, it's possible, but the syntax is slightly different.

@startuml
clock clk with period 1
binary "enable" as EN
concise "dataBus" as db

@0 as :start
@5 as :en_high 
@10 as :en_low
@:en_high-2 as :EnHighMinus2
@:start
EN is low
db is "0x0000"

@:en_high
EN is high

@:en_low
EN is low

@:EnHighMinus2
db is "0xf23a"

@:en_high+6
db is "0x0000"
@enduml

commented May 15, 2021 by Serge Wenger Work (15,620 points)
Thanks for the answer.

I do a proposal to add this case in the "Anchor Points" sample
...