Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ S3method(guide_geom,default)
S3method(guide_merge,default)
S3method(guide_train,default)
S3method(guide_transform,default)
S3method(heightDetails,ggplot)
S3method(heightDetails,ggplot_built)
S3method(heightDetails,titleGrob)
S3method(heightDetails,zeroGrob)
S3method(limits,Date)
Expand Down Expand Up @@ -146,6 +148,8 @@ S3method(vec_ptype2,mapped_discrete.double)
S3method(vec_ptype2,mapped_discrete.factor)
S3method(vec_ptype2,mapped_discrete.integer)
S3method(vec_ptype2,mapped_discrete.mapped_discrete)
S3method(widthDetails,ggplot)
S3method(widthDetails,ggplot_built)
S3method(widthDetails,titleGrob)
S3method(widthDetails,zeroGrob)
export("%+%")
Expand Down
12 changes: 12 additions & 0 deletions R/utilities-grid.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,15 @@
cli::cli_abort("Don't know how to get height of {.cls {class(x)}} object")
}
}

#' @export
widthDetails.ggplot <- function(x) widthDetails(ggplotGrob(x))

Check warning on line 72 in R/utilities-grid.R

View check run for this annotation

Codecov / codecov/patch

R/utilities-grid.R#L72

Added line #L72 was not covered by tests

#' @export
widthDetails.ggplot_built <- widthDetails.ggplot

#' @export
heightDetails.ggplot <- function(x) heightDetails(ggplotGrob(x))

Check warning on line 78 in R/utilities-grid.R

View check run for this annotation

Codecov / codecov/patch

R/utilities-grid.R#L78

Added line #L78 was not covered by tests

#' @export
heightDetails.ggplot_built <- heightDetails.ggplot
Loading