コンポーネント図でオブジェクトの配置を調整する (together 編)
グループ化するような方法でも、オブジェクトの配置をできます。
together
キーワードを使います。
まずは、単純にコンポーネントを作ってみた場合です。
component compoA as obj1 #lightpink component コンポB as obj2 #lightblue component こんぽC as obj3 #lightgreen component konpoD as obj4 #lightgray
ここで、B と C を近くに配置したい場合、それぞれを together
キーワードで括ります。
component compoA as obj1 #lightpink component konpoD as obj4 #lightgray together { component コンポB as obj2 #lightblue component こんぽC as obj3 #lightgreen }
前回使った、[hidden]
も組み合わせて使用できます。
component compoA as obj1 #lightpink component konpoD as obj4 #lightgray together { component コンポB as obj2 #lightblue component こんぽC as obj3 #lightgreen obj2 -[hidden]-> obj3 }
コンポーネント間の位置がちょっと気になる場合は、次のような操作を試し、工夫してみてください。
- 記述順序を変えてみる
-[hidden]->
-[hidden]>
をうまく使う