From 2d8a5128d7e27f7883ebc87c8f7909b950598fc6 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Sat, 16 Dec 2023 00:35:08 +0100 Subject: [PATCH] Fix misalignment bug --- R/draw-keys.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/draw-keys.R b/R/draw-keys.R index 3731a96..10b49b6 100644 --- a/R/draw-keys.R +++ b/R/draw-keys.R @@ -49,8 +49,8 @@ draw_key_richtext <- function(data, params, size) { x = unit(just$hjust, "npc"), y = unit(just$vjust, "npc"), rot = data$angle, - hjust = just$hjust, - vjust = just$vjust, + hjust = data$hjust, + vjust = data$vjust, gp = text_gp, box_gp = box_gp, # Defaults for unit input are the same as `geom_richtext()` formals