Skip to content

Commit

Permalink
fix error when select theme element
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Nov 4, 2024
1 parent 2695a9f commit 79bf4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/guides.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ collapse_guides <- function(guides) {
#' @importFrom grid editGrob heightDetails widthDetails valid.just unit.c unit
#' @importFrom ggplot2 margin element_grob element_blank calc_element element_render
guides_build <- function(guides, theme) {
legend.spacing.y <- calc_element(theme, "legend.spacing.y")
legend.spacing.x <- calc_element(theme, "legend.spacing.x")
legend.spacing.y <- calc_element("legend.spacing.y", theme)
legend.spacing.x <- calc_element("legend.spacing.x", theme)
legend.box.margin <- calc_element("legend.box.margin", theme) %||% margin()

widths <- exec(unit.c, !!!lapply(guides, gtable_width))
Expand Down

0 comments on commit 79bf4cd

Please sign in to comment.