Skip to content
Merged
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
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ export(guides)
export(has_flipped_aes)
export(is.Coord)
export(is.coord)
export(is.element)
export(is.facet)
export(is.geom)
export(is.ggplot)
Expand All @@ -475,6 +474,7 @@ export(is.position)
export(is.scale)
export(is.stat)
export(is.theme)
export(is.theme_element)
export(label_both)
export(label_bquote)
export(label_context)
Expand Down
2 changes: 1 addition & 1 deletion R/guide-.R
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ Guide <- ggproto(
# Renders tickmarks
build_ticks = function(key, elements, params, position = params$position,
length = elements$ticks_length) {
if (!is.element(elements)) {
if (!is.theme_element(elements)) {
elements <- elements$ticks
}
if (!inherits(elements, "element_line")) {
Expand Down
2 changes: 1 addition & 1 deletion R/plot-build.R
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ ggplot_gtable.ggplot_built <- function(data) {
plot_margin <- calc_element("plot.margin", theme)
plot_table <- gtable_add_padding(plot_table, plot_margin)

if (is.element(theme$plot.background)) {
if (is.theme_element(theme$plot.background)) {
plot_table <- gtable_add_grob(plot_table,
element_render(theme, "plot.background"),
t = 1, l = 1, b = -1, r = -1, name = "background", z = -Inf)
Expand Down
2 changes: 1 addition & 1 deletion R/theme-elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ element_geom <- function(

#' @export
#' @rdname is_tests
is.element <- function(x) inherits(x, "element")
is.theme_element <- function(x) inherits(x, "element")

#' @export
print.element <- function(x, ...) utils::str(x)
Expand Down
2 changes: 1 addition & 1 deletion R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ theme <- function(...,
# If complete theme set all non-blank elements to inherit from blanks
if (complete) {
elements <- lapply(elements, function(el) {
if (is.element(el) && !inherits(el, "element_blank")) {
if (is.theme_element(el) && !inherits(el, "element_blank")) {
el$inherit.blank <- TRUE
}
el
Expand Down
4 changes: 2 additions & 2 deletions man/is_tests.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading