From 016bedd2d51a32a0066f8ac4134da13dfba40015 Mon Sep 17 00:00:00 2001 From: mtennekes Date: Tue, 9 Apr 2024 18:44:32 +0200 Subject: [PATCH] fixed #852 --- R/tmapGridSymbols.R | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/R/tmapGridSymbols.R b/R/tmapGridSymbols.R index ec3ac0ca..f66ec3b7 100644 --- a/R/tmapGridSymbols.R +++ b/R/tmapGridSymbols.R @@ -52,11 +52,17 @@ tmapGridSymbols = function(shpTM, dt, gp, bbx, facet_row, facet_col, facet_page, grobs <- lapply(1:length(gp$shape), function(i) { shi = gp$shape[[i]] - just = args$just + just = if (is.na(args$just[1])) c(0.5, 0.5) else args$just jst = if (!is.na(shi) && shi>999) { js = justLib[[shi-999]] - if (is.na(js[1])) args$just else js - } else args$just + if (!is.na(js[1])) { + js + } else if (!is.na(args$just[1])) { + args$just + } else { + just + } + } else just justs.x = jst[1] justs.y = jst[2]