Skip to content

Commit 079ac68

Browse files
committed
Close #1970: revert plotly.js 2.0 change in default modebar buttons
1 parent 278b670 commit 079ac68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/layout.R

+5
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ config <- function(p, ..., cloud = FALSE, showSendToCloud = cloud, locale = NULL
162162

163163
args <- list(...)
164164
if ("collaborate" %in% names(args)) warning("The collaborate button is no longer supported")
165+
166+
args$modeBarButtonsToAdd <- unique(c(
167+
args$modeBarButtonsToAdd, c("hoverclosest", "hovercompare")
168+
))
169+
165170
p$x$config <- modify_list(p$x$config, args)
166171
if (cloud) warning("The `cloud` argument is deprecated. Use `showSendToCloud` instead.")
167172
p$x$config$showSendToCloud <- showSendToCloud

0 commit comments

Comments
 (0)