Decoration callback for token selection
token_select_decoration(stroke = "black")
Sets the `stroke` attribute of selected tokens.
A JavaScript callback function called when token selection changes.
animate_process
# Create a decoration callback that paints tokens red
token_select_decoration("red")
#> [1] "function(node, selected) {\n if (selected) {\n node.attr(\"stroke-width\", \"3\")\n .attr(\"stroke\", \"red\");\n } else {\n node.attr(\"stroke-width\", \"1\")\n .attr(\"stroke\", \"black\");\n }\n }"