From 4cd424258d583bfc7b8b5361af67ea88be980245 Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Sun, 20 Mar 2022 15:29:34 +0100 Subject: [PATCH] #215 Lay_x calls supports long version Lay_xxxx too --- C4.puml | 15 +++++++++++++++ README.md | 10 +++++----- percy/TestLayDirections.puml | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 percy/TestLayDirections.puml diff --git a/C4.puml b/C4.puml index 3f82416..14ea420 100644 --- a/C4.puml +++ b/C4.puml @@ -1117,15 +1117,30 @@ $getRel($right("<<-","->>"), $from, $to, $label, $techn, $descr, $sprite, $tags, !unquoted procedure Lay_D($from, $to) $from -[hidden]D- $to !endprocedure +!unquoted procedure Lay_Down($from, $to) +$from -[hidden]D- $to +!endprocedure + !unquoted procedure Lay_U($from, $to) $from -[hidden]U- $to !endprocedure +!unquoted procedure Lay_Up($from, $to) +$from -[hidden]U- $to +!endprocedure + !unquoted procedure Lay_R($from, $to) $from -[hidden]R- $to !endprocedure +!unquoted procedure Lay_Right($from, $to) +$from -[hidden]R- $to +!endprocedure + !unquoted procedure Lay_L($from, $to) $from -[hidden]L- $to !endprocedure +!unquoted procedure Lay_Left($from, $to) +$from -[hidden]L- $to +!endprocedure ' PlantUML bug: lines which does "not match" with the orientation/direction of the diagram ' uses the same length therefore the method offers no direction at all. diff --git a/README.md b/README.md index 4806e4b..5bd3de2 100644 --- a/README.md +++ b/README.md @@ -283,12 +283,12 @@ Rel_D(user, user1, "requests", "async message", "if sprite starts with &, it def ![Relation with sprite or OpenIconic](https://www.plantuml.com/plantuml/png/bLJVQnin37w_lq8DeMiXoQN9DiWWKDPnCDRHqjBdujXAOkgpRvPlMHdxt-SVSPEikK7rujCdIzyd8TybEMPTMwlYH6gkMe6mTgwXJsLfsMQqacxTBbf2oursgDs8cxfi5DCXPqXEABaehzuFRmFqyFswh1avj1vwl0ePlzoe2TMBMxHaz5aeDO3UWpzwv_lWnHQ5YqDyal798JxD-DJZnVspPwtFA1u-almGUGVQs9efeCPAXmJC8ZXZO25NKDoXUhpUYifiKYzz1lNy9pUjbMZ3PtSL7-qdUDvhei198YRE58g35FCKAU_sAAUTb4VoRxuTOHl4Y_Fnw4FYvQPUI8tRH61Q92bUC33GkDb6YfF-zgguxwpu1hsvMBVYV_YysZ2c1haCe_NpLMXViZdJiC30AOg4GTzPoVHA8VmkmDjuPpk_ElIhpzN__6escrNTVlKnMDNbLzDaLPUVRVnAxvyysRJyBwjhh40RHniUOZZZOF9O1g3a4u9R8oGyZsH_CJAMza4kyoh4nqwmaMuDfuEC2bnAZGGCRXhKNxdHaWyywfXK18IxNuBNAcCu_WQClrt6BhxizYC-P8i_MYGNks3qh3dKICHM681EET8TbP8QFaNz4vMd779b2CMkNPX3xrNqlBX4BTfQ_GK0 "Relation with sprite or OpenIconic") -In rare cases, you can force the layout of objects which have no relationships by using: +In rare cases, you can force the layout of elements which have no relationships by using: -* `Lay_U(from, to)` -* `Lay_D(from, to)` -* `Lay_L(from, to)` -* `Lay_R(from, to)` +* `Lay_U(from, to)`, `Lay_Up(from, to)` +* `Lay_D(from, to)`, `Lay_Down(from, to)` +* `Lay_L(from, to)`, `Lay_Left(from, to)` +* `Lay_R(from, to)`, `Lay_Right(from, to)` In following sample a person uses different systems, and group of persons which have no relations diff --git a/percy/TestLayDirections.puml b/percy/TestLayDirections.puml new file mode 100644 index 0000000..f3ba23e --- /dev/null +++ b/percy/TestLayDirections.puml @@ -0,0 +1,32 @@ +@startuml +' convert it with additional command line argument -DRELATIVE_INCLUDE="." to use locally +!if %variable_exists("RELATIVE_INCLUDE") + !include ./../C4_Container.puml +!else + !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml +!endif + +HIDE_STEREOTYPE() + +Person(a, "A") +Person(a1, "P1") +Person(a2, "P2") +Person(a3, "P3") +Person(a4, "P4") + +Lay_U(a, a1) +Lay_R(a, a2) +Lay_D(a, a3) +Lay_L(a, a4) + +Person(x, "X") +System(s1, "S1") +System(s2, "S2") +System(s3, "S3") +System(s4, "S4") + +Lay_Up(x, s1) +Lay_Right(x, s2) +Lay_Down(x, s3) +Lay_Left(x, s4) +@enduml