Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ggplot and grid fixes #452

Merged
merged 11 commits into from
Jul 6, 2024
Prev Previous commit
Next Next commit
Fix fallback for ScalesList
  • Loading branch information
moodymudskipper committed Jul 6, 2024
commit 1782daf5924765bec1be438a0a0efa395e785a5e
2 changes: 1 addition & 1 deletion R/s3-ggplot2-ScalesList.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ is_corrupted_ScalesList <- function(x) {
#' @method .cstr_construct.ScalesList ScalesList
.cstr_construct.ScalesList.ScalesList <- function(x, ...) {
# FIXME: appropriate constructors
if (!length(x$scales)) return(NextMethod(x))
if (!length(x$scales)) return(.cstr_construct.ScalesList.environment(x, ...))
scales_chr <- lapply(x$scales, function(x, ...) .cstr_construct(x, ...), ...)
if (length(x$scales) == 1) return(scales_chr[[1]])
Reduce(function(x, y) .cstr_pipe(x, y, pipe = "plus", indent = FALSE), scales_chr)
Expand Down