I am creating a timeline using R/Shiny timevis package. I can see in R/Shiny that you can setOptions so that the items are editable. I can see in visjs documentation that you can then set individual manipulation actions (see below).
Is there a way for me to set these options from R/Shiny using setOptions? Thanks...
timevis(groups = project_groups) %>%
setOptions(list(editable = TRUE,
...
https://visjs.github.io/vis-timeline/docs/timeline/#Editing_Items
// enable or disable all manipulation actions
var options = {
editable: true // true or false
};
// enable or disable individual manipulation actions
var options = {
editable: {
add: true, // add new items by double tapping
updateTime: true, // drag items horizontally
updateGroup: true, // drag items from one group to another
remove: true, // delete an item by tapping the delete button top right
overrideItems: false // allow these options to override item.editable
}
};
Yes you can set individual options. Here is an example:
library(timevis)
timevis(
data.frame(start = Sys.Date(), content = "Today"),
options = list(editable = list(add = TRUE, remove = FALSE))
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.