# Basic configuration
config <- drag_element_force()
# Custom configuration with JavaScript arrow function and custom key
config <- drag_element_force(
key = "my-custom-drag-force",
fixed = TRUE,
enable = JS("(event) => { return event.targetType === 'node'; }"),
hideEdge = "both",
cursor = list(
default = "default",
grab = "grab",
grabbing = "grabbing"
)
)
Run the code above in your browser using DataLab