Skip to content

Commit e8aa8b0

Browse files
committed
Close #1951: use computed_[geom/stat]_params over [geom/stat]_params if available
1 parent e02a704 commit e8aa8b0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: R/layers2layout.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layers2layout <- function(gglayout, layers, layout) {
33
geoms <- sapply(layers, function(x) class(x[["geom"]])[1])
44
RasterGeom <- which(geoms %in% "GeomRasterAnn")
55
for (i in RasterGeom) {
6-
params <- layers[[i]]$geom_params
6+
params <- layers[[i]]$computed_geom_params %||% layers[[i]]$geom_params
77
for (j in seq_len(nrow(layout))) {
88
lay <- layout[j, ]
99

Diff for: R/layers2traces.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ layers2traces <- function(data, prestats_data, layout, p) {
66
# Extract parameters (and "hovertext aesthetics") in each layer
77
params <- Map(function(x, y) {
88
param <- c(
9-
y[["geom_params"]], y[["stat_params"]], y[["aes_params"]],
9+
y[["computed_geom_params"]] %||% y[["geom_params"]],
10+
y[["computed_stat_params"]] %||% y[["stat_params"]],
11+
y[["aes_params"]],
1012
position = ggtype(y, "position")
1113
)
1214

0 commit comments

Comments
 (0)