Skip to content

Commit

Permalink
fallback for boolean space_free
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Jan 23, 2025
1 parent 97edd62 commit 1d22c2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/facet-.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ Facet <- ggproto("Facet", NULL,
heights <- unit(rep(1 * abs(aspect_ratio %||% 1), dim[1]), "null")

# When space are free, let panel parameter limits determine size of panel
space <- params$space_free %||% list(x = FALSE, y = FALSE)
space <- dual_param(params$space_free, default = list(x = FALSE, y = FALSE))

if (space$x) {
idx <- layout$PANEL[layout$ROW == 1]
widths <- vapply(idx, function(i) diff(ranges[[i]]$x.range), numeric(1))
Expand Down

0 comments on commit 1d22c2e

Please sign in to comment.