Skip to content

Commit a4f1221

Browse files
committed
revert
1 parent d7aa7c4 commit a4f1221

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

R/guide-colorbar.R

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,7 @@ guide_colourbar <- function(
146146

147147
theme <- deprecated_guide_args(theme, ...)
148148
if (!is.null(position)) {
149-
if (is.numeric(position)) {
150-
if (length(position) != 2L) {
151-
cli::cli_abort("{.arg position} must be a numeric of length 2")
152-
}
153-
} else {
154-
position <- arg_match0(position, c(.trbl, "inside"))
155-
}
149+
position <- arg_match0(position, c(.trbl, "inside"))
156150
}
157151
check_number_decimal(alpha, min = 0, max = 1, allow_na = TRUE)
158152

@@ -218,20 +212,19 @@ GuideColourbar <- ggproto(
218212
hashables = exprs(title, key$.label, decor, name),
219213

220214
elements = list(
221-
background = "legend.background",
222-
margin = "legend.margin",
223-
key = "legend.key",
224-
key_height = "legend.key.height",
225-
key_width = "legend.key.width",
226-
text = "legend.text",
227-
theme.title = "legend.title",
228-
text_position = "legend.text.position",
229-
title_position = "legend.title.position",
230-
axis_line = "legend.axis.line",
231-
ticks = "legend.ticks",
232-
ticks_length = "legend.ticks.length",
233-
frame = "legend.frame",
234-
inside_position = "legend.position.inside"
215+
background = "legend.background",
216+
margin = "legend.margin",
217+
key = "legend.key",
218+
key_height = "legend.key.height",
219+
key_width = "legend.key.width",
220+
text = "legend.text",
221+
theme.title = "legend.title",
222+
text_position = "legend.text.position",
223+
title_position = "legend.title.position",
224+
axis_line = "legend.axis.line",
225+
ticks = "legend.ticks",
226+
ticks_length = "legend.ticks.length",
227+
frame = "legend.frame"
235228
),
236229

237230
extract_key = function(scale, aesthetic, ...) {

0 commit comments

Comments
 (0)