Skip to content

connection by class specification #2563

@bo-ku-ra

Description

@bo-ku-ra

i want to write more simply.

ex. *{class:fuga} -> y

https://play.d2lang.com/?script=lJDRCoIwFIbvz1McEaQG8yLoZoIvEl0snU4aGttCpuzdYyZUFmi7O4zvP_93-FgobgyTXS08XOaputfcQ_HxR8bkNWZorFMirRqlGMquFa4UfeYBYrrhQYzkfRXSHN1GlNDcwY5MyP5EziMgJkYX6TMPQyDg3M9Y3V0F7ZvSSobHDDws2WgFZmg1b82Na9HaEPCv4XS-sHLYbjjMLYdfhiFwaVhyIxkeQr8FGa2gX36PAAAA__8%3D&

a{class:hoge}
b{class:fuga}
c{class:hoge}
*{&class:hoge; style.fill: honeydew;}

#------------------------------------
# *{class:fuga} -> y
#------------------------------------
*->y
(* -> y)[*]{
  &src.class: fuga
  style.stroke-width: 5;
}

(* -> y)[*]{
  !&src.class: fuga
  style.stroke: transparent;
}
#------------------------------------
# *{class:hoge} -> z
#------------------------------------
*->z
(* -> z)[*]{
  &src.class: hoge
  style.stroke-dash: 2;
}
(* -> z)[*]{
  !&src.class: hoge
  style.stroke: transparent;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions