Decoration callback for activity selection

activity_select_decoration(
  stroke_dasharray = "2",
  stroke_width = "2",
  stroke = "black"
)

Arguments

stroke_dasharray

Sets the `stroke-dasharray` attribute for selected activities.

stroke_width

Sets the `stroke-width` attribute for selected activities.

stroke

Sets the `stroke` attribute for selected activities.

Value

A JavaScript callback function called when activity selection changes.

See also

animate_process

Examples

# Create a decoration callback that increases the activity stroke width
activity_select_decoration(stroke_width = "5")
#> [1] "function(node, selected) {\n            if (selected) {\n              node.attr(\"stroke-width\", \"5\")\n                  .attr(\"stroke-dasharray\", \"2\")\n                  .attr(\"stroke\", \"black\");\n            } else {\n              node.attr(\"stroke-width\", \"1\")\n                  .attr(\"stroke-dasharray\", \"0\")\n                  .attr(\"stroke\", \"#c0c0c0\");\n            }\n          }"