From 702a226c7ab8136c96ae32af9c8f9b1a41bb439f Mon Sep 17 00:00:00 2001 From: mtennekes Date: Tue, 16 Jul 2024 15:35:01 +0200 Subject: [PATCH] fixed #900 --- R/tmapGridAux.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/tmapGridAux.R b/R/tmapGridAux.R index f85682e8..47f9634f 100644 --- a/R/tmapGridAux.R +++ b/R/tmapGridAux.R @@ -88,10 +88,10 @@ tmapGridTilesPrep = function(a, bs, id, o) { d = s$dt d[, c("col", "legnr", "crtnr") := do.call(srgb$FUN, list(x1 = red, x2 = green, x3 = blue, scale = srgb, legend = list(), o = o, aes = "col", layer = "raster", sortRev = NA, bypass_ord = TRUE))] if ("alpha" %in% names(d)) { - d[, col_alpha:=alpha/255] + d[, col_alpha:=alpha/255 * a$alpha] d[is.na(col_alpha), col_alpha:=0] } else { - d[, col_alpha:=1L] + d[, col_alpha:=a$alpha] } d })