Skip to content

Commit

Permalink
Fix regression theme(legend.direction) (#5508)
Browse files Browse the repository at this point in the history
* use correct direction

* Add test
  • Loading branch information
teunbrand authored Nov 27, 2023
1 parent 091d92a commit 44c2497
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/guides-.R
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ Guides <- ggproto(
horizontal = c("center", "top")
)

grobs <- self$draw(theme, position, default_direction)
grobs <- self$draw(theme, position, theme$legend.direction)
if (length(grobs) < 1) {
return(zeroGrob())
}
Expand Down
115 changes: 115 additions & 0 deletions tests/testthat/_snaps/guides/horizontal-legend-direction.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 44c2497

Please sign in to comment.