Skip to content

Commit

Permalink
making the code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlandis committed Dec 9, 2023
1 parent 930f6bf commit 375eb63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/plot-construction.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ update_ggside.ggplot <- function(object, ggside = NULL){
object$ggside$collapse <- ggside$collapse %||% object$ggside$collapse %||% NULL
fp <- object[['facet']]$params
col <- object$ggside$collapse
if (!is.null(fp$free) && !is.null(col) && inherits(object[['facet']], "FacetWrap") && any(.lgl <- vapply(fp$free, identity, logical(1)))) {
if (!is.null(fp$free) &&
!is.null(col) &&
inherits(object[['facet']], "FacetWrap") &&
any(.lgl <- vapply(fp$free, identity, logical(1)))) {
# if ggside collapse all - but scales is free - prioritize the scale and dont
# collapse
# i.e. facet_wrap(..., scales='free_y') + ggside(collapse="y") --> warning
Expand Down

0 comments on commit 375eb63

Please sign in to comment.