From 742d2820275e1b03d43e688f7f65d103fa95df72 Mon Sep 17 00:00:00 2001 From: rhijmans Date: Tue, 30 Jan 2024 08:02:05 +0100 Subject: [PATCH] fixes #1413 --- NEWS.md | 2 ++ R/lines.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 2264b56c5..627645dd1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ - `plot(add=TRUE)` sampled the raster data without considering the extent of the map. [#1394](https://github.com/rspatial/terra/issues/1394) by Márcia Barbosa - `plot(add=TRUE)` now only considers the first layer of a multi-layer SpatRaster [1395](https://github.com/rspatial/terra/issues/1395) by Márcia Barbosa - `set.cats` failed with a tibble was used instead of a data.frame [#1406](https://github.com/rspatial/terra/issues/1406) by Mike Koontz +- `polys` argument "alpha" was ignored if a single color was used. [#1413](https://github.com/rspatial/terra/issues/1413) by Derek Friend + ## enhancements diff --git a/R/lines.R b/R/lines.R index 8bcd97c91..9e6a4c039 100644 --- a/R/lines.R +++ b/R/lines.R @@ -132,7 +132,7 @@ setMethod("polys", signature(x="SpatVector"), } if (missing(col)) { col <- NULL - } else if (length(col) > 1) { + } else { col <- .getCols(length(x), col, alpha) } out <- list(main_cols=col)