Skip to content

Commit 9c21cb5

Browse files
authored
rename is.element() to is.theme_element() (#6160)
1 parent f12b73d commit 9c21cb5

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ export(guides)
461461
export(has_flipped_aes)
462462
export(is.Coord)
463463
export(is.coord)
464-
export(is.element)
465464
export(is.facet)
466465
export(is.geom)
467466
export(is.ggplot)
@@ -475,6 +474,7 @@ export(is.position)
475474
export(is.scale)
476475
export(is.stat)
477476
export(is.theme)
477+
export(is.theme_element)
478478
export(label_both)
479479
export(label_bquote)
480480
export(label_context)

R/guide-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Guide <- ggproto(
381381
# Renders tickmarks
382382
build_ticks = function(key, elements, params, position = params$position,
383383
length = elements$ticks_length) {
384-
if (!is.element(elements)) {
384+
if (!is.theme_element(elements)) {
385385
elements <- elements$ticks
386386
}
387387
if (!inherits(elements, "element_line")) {

R/plot-build.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ ggplot_gtable.ggplot_built <- function(data) {
288288
plot_margin <- calc_element("plot.margin", theme)
289289
plot_table <- gtable_add_padding(plot_table, plot_margin)
290290

291-
if (is.element(theme$plot.background)) {
291+
if (is.theme_element(theme$plot.background)) {
292292
plot_table <- gtable_add_grob(plot_table,
293293
element_render(theme, "plot.background"),
294294
t = 1, l = 1, b = -1, r = -1, name = "background", z = -Inf)

R/theme-elements.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ element_geom <- function(
204204

205205
#' @export
206206
#' @rdname is_tests
207-
is.element <- function(x) inherits(x, "element")
207+
is.theme_element <- function(x) inherits(x, "element")
208208

209209
#' @export
210210
print.element <- function(x, ...) utils::str(x)

R/theme.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ theme <- function(...,
529529
# If complete theme set all non-blank elements to inherit from blanks
530530
if (complete) {
531531
elements <- lapply(elements, function(el) {
532-
if (is.element(el) && !inherits(el, "element_blank")) {
532+
if (is.theme_element(el) && !inherits(el, "element_blank")) {
533533
el$inherit.blank <- TRUE
534534
}
535535
el

man/is_tests.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)