From 321af46fcccdd41743c666f01068dda81cea86d3 Mon Sep 17 00:00:00 2001 From: Yunuuuu Date: Mon, 30 Dec 2024 18:56:48 +0800 Subject: [PATCH] ggmark: fix names --- R/ggmark.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/ggmark.R b/R/ggmark.R index 6f963268..c9c67446 100644 --- a/R/ggmark.R +++ b/R/ggmark.R @@ -158,7 +158,10 @@ MarkGg <- ggproto("MarkGg", AlignProto, extra_links <- NULL } self$unlock() - self$mark$links <- c(extra_links, links) + + # Do not use `vec_c()`, as it automatically extract `names` and assign + # it to the combined object, which may result in duplicated names. + self$mark$links <- new_pair_links(c(extra_links, links)) on.exit(self$mark <- mark) # restore the original `mark` on.exit(self$lock(), add = TRUE)