# Basic configuration
config <- fix_element_size()
# Custom configuration with filters and specific shape configurations
config <- fix_element_size(
key = "my-fix-size-behavior",
reset = TRUE,
state = "active",
node = list(
list(shape = "circle", fields = c("r", "lineWidth")),
list(shape = "label", fields = c("fontSize"))
),
nodeFilter = JS("(node) => node.type === 'important'"),
edge = list(shape = "line", fields = c("lineWidth", "lineDash")),
edgeFilter = JS("(edge) => edge.weight > 5")
)
Run the code above in your browser using DataLab