d2 icon indicating copy to clipboard operation
d2 copied to clipboard

[Globs] err:connection missing destination

Open bo-ku-ra opened this issue 1 year ago • 4 comments

1_1
1-1

*_*{style.fill:GREEN}
*-*{style.fill:RED} # err:connection missing destination

image

bo-ku-ra avatar Jun 29 '24 02:06 bo-ku-ra

@bo-ku-ra you must target them.

Normal targeting is (a -> b)[0].style.fill..., so glob targeting all is (* -> *)[*].style.fill...

alixander avatar Jun 29 '24 03:06 alixander

@alixander i want "1-1" is RED by using glob.

"1-1"
*-*{style.fill:RED} # err:connection missing destination

image

bo-ku-ra avatar Jun 29 '24 03:06 bo-ku-ra

oh, apologies i misunderstood.

I'm not sure if that should be allowed, but at the very least it shouldn't be parsing as a connection with just one dash

alixander avatar Jun 29 '24 15:06 alixander

every shape's labels must be captured by 'Globs'. i think so.

bo-ku-ra avatar Jun 29 '24 20:06 bo-ku-ra