d2 icon indicating copy to clipboard operation
d2 copied to clipboard

more `animated`

Open alixander opened this issue 2 years ago • 3 comments

this is a pretty cool diagram.

1688137526812

we should be able to achieve the same effect if we extend animated.

  • for shapes, it'll do blinking
  • for non-dashed lines, it'll make a circle to move along src to dst.

once connections can get icons, animated on connections can move the icon instead

alixander avatar Jun 30 '23 18:06 alixander

i think the relationship between "style.animated: true" and "--animate-interval" needs to be solved, too.

test.d2

x->y{style.animated: true;}

>d2 --animate-interval 10 test.d2

please see the test.svg

bo-ku-ra avatar Jul 01 '23 03:07 bo-ku-ra

we can also get the label to follow the dot

once connections can get icons, animated on connections can move the icon instead

perhaps this would be easier if we added some builtin icons like circles. maybe just the same values that arrowheads take

alixander avatar Oct 04 '23 03:10 alixander

i would like the feature to change the color of connections on mouse over( or click ) instead of animation. especially when using 'elk'.

bo-ku-ra avatar Oct 12 '24 13:10 bo-ku-ra