Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carson Sievert <[email protected]>
  • Loading branch information
trekonom and cpsievert committed Sep 6, 2024
1 parent 805193b commit 359ec28
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -937,16 +937,13 @@ gg2list <- function(p, width = NULL, height = NULL,
}
# Only FacetGrid has no cols
if (inherits(plot$facet, "FacetGrid")) {
row_txt <- if (!length(names(plot$facet$params$rows)) == 0) {
paste(
plot$facet$params$labeller(
lay[names(plot$facet$params$rows)]
),
collapse = br()
)
} else {
""
}
row_txt <- paste(
plot$facet$params$labeller(
lay[names(plot$facet$params$rows)]
),
collapse = br()
)
if (length(names(plot$facet$params$rows)) == 0) row_txt <- ""
if (is_blank(theme[["strip.text.y"]])) row_txt <- ""
if (lay$COL != nCols) row_txt <- ""
if (robust_nchar(row_txt) > 0) {
Expand Down

0 comments on commit 359ec28

Please sign in to comment.