Skip to content

Commit 5fffbf8

Browse files
committed
Merge branch 'master' into relative-dependency-paths
2 parents 9f2a56d + bdacc09 commit 5fffbf8

File tree

5 files changed

+5
-35
lines changed

5 files changed

+5
-35
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ env:
1616
- secure: "WsvmMHN4YVhnk0bLRE04APcLbs5s4vWKSHjEdU0bPXd0xdMTzZeP5D7pxyF1983C+P5LpSnGHv4dgwLMBkNzxJwBR7/Ta7lfO1akYILWwxib+1DVbCqUH5Z4Ba1FSCQptIrLNGR3P7+0Lem4hEhqKdPKltFnxhnXO0Y+MeG71IQ="
1717
# MAPBOX_TOKEN (for testing `plot_mapbox()`)
1818
- secure: "QPBEqtLRdwb4ablJORzD0JdCT9ESe3nNdIehM1oxfcNKfpSdf2OFxH3TkeYY1nMpv0mLxiMNTy6xcj9Yk5MaaBCIA0P7q6OdZv9ruzQD1j3g84gP45KwBilbPGjb+/EvOS0fM25vR/pAmA8IyoUfPC2J8HwiNnW8DYdt/hJOJ9A="
19+
# GITHUB_PAT
20+
- secure: "lZf7GBt1+ogux5WAXmIZ6/VBTmR1G7rv+8Aevogfan7GWb32K3IVatsrKr1pSvz0hysP0MDueQqTv0GcNOvrFnYvobyo6fFpx+n33WkXQCGybUOHyfJpPdw1L2wtAy88ugNJDl+n9fdXr4yL2cWvRqq4WBKeeSi6hpdiKOaoB3Y="
1921

2022
before_install:
2123
- echo "Sys.setenv('plotly_username' = 'cpsievert')" > ~/.Rprofile

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
* `subplot()` now bumps annotation `xref`/`yref` anchors correctly (#1181).
1717
* `subplot()` now accumulates images, repositions paper coordinates, and reanchors axis references (#1332).
18+
* In some cases, a `ggplotly()` colorbar would cause issues with hover behavior, which is now fixed (#1381).
1819
* Recursive attribute validation is now only performed on recursive objects (#1315).
1920

2021
# 4.8.0

R/ggplotly.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ gdef2trace <- function(gdef, theme, gglayout) {
13001300
type = "scatter",
13011301
mode = "markers",
13021302
opacity = 0,
1303-
hoverinfo = "none",
1303+
hoverinfo = "skip",
13041304
showlegend = FALSE,
13051305
# do everything on a 0-1 scale
13061306
marker = list(

inst/htmlwidgets/plotly.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -305,39 +305,6 @@ HTMLWidgets.widget({
305305
});
306306
}
307307

308-
309-
// send user input event data to dashR
310-
// TODO: make this more consistent with Graph() props?
311-
var dashRwidgets = window.dashRwidgets || {};
312-
var dashRmode = typeof el.setProps === "function" &&
313-
typeof dashRwidgets.htmlwidget === "function";
314-
if (dashRmode) {
315-
graphDiv.on('plotly_relayout', function(d) {
316-
el.setProps({"input_plotly_relayout": d});
317-
});
318-
graphDiv.on('plotly_hover', function(d) {
319-
el.setProps({"input_plotly_hover": eventDataWithKey(d)});
320-
});
321-
graphDiv.on('plotly_click', function(d) {
322-
el.setProps({"input_plotly_click": eventDataWithKey(d)});
323-
});
324-
graphDiv.on('plotly_selected', function(d) {
325-
el.setProps({"input_plotly_selected": eventDataWithKey(d)});
326-
});
327-
graphDiv.on('plotly_unhover', function(eventData) {
328-
el.setProps({"input_plotly_hover": null});
329-
});
330-
graphDiv.on('plotly_doubleclick', function(eventData) {
331-
el.setProps({"input_plotly_click": null});
332-
});
333-
// 'plotly_deselect' is code for doubleclick when in select mode
334-
graphDiv.on('plotly_deselect', function(eventData) {
335-
el.setProps({"input_plotly_selected": null});
336-
el.setProps({"input_plotly_click": null});
337-
});
338-
}
339-
340-
341308
// Given an array of {curveNumber: x, pointNumber: y} objects,
342309
// return a hash of {
343310
// set1: {value: [key1, key2, ...], _isSimpleKey: false},

tests/testthat/test-ggplot-sf.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test_that("geom_sf() polygons with fill/text.", {
5454
# one trace for every fillcolor, one for graticule, one for colorbar
5555
expect_length(l$data, length(unique(nc$AREA)) + 2)
5656
expect_true(
57-
all(unlist(lapply(l$data, "[[", "hoverinfo")) %in% c("none", "text"))
57+
all(unlist(lapply(l$data, "[[", "hoverinfo")) %in% c("skip", "none", "text"))
5858
)
5959
# graticule styling should inherit from panel.grid.major
6060
expect_equivalent(

0 commit comments

Comments
 (0)