Skip to content

Commit

Permalink
fixed #871 and #872
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed May 5, 2024
1 parent a860238 commit 6c8de25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/tm_layers_polygons.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ tm_polygons = function(fill = tm_const(),
layer_fun = if ("called_from" %in% names(args)) {
args$called_from
} else {
"polygons"
"tm_polygons"
}

v3_start_message()
Expand Down Expand Up @@ -203,7 +203,7 @@ tm_polygons = function(fill = tm_const(),
v3_convert2density(layer_fun)
}

if ("col" %in% names(args_called) && (!args$called_from %in% c("tm_fill", "qtm"))) {
if ("col" %in% names(args_called) && (!layer_fun %in% c("tm_fill", "qtm"))) {
fill = col
col = tm_const()
v3_message_col_fill(layer_fun = layer_fun)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ tm_layout = function(
NULL
}
title2 = if (!is.null(main.title)) {
main.title.args = args[substr(names(args), 1, 5) == "main.title"]
main.title.args = args[substr(names(args), 1, 10) == "main.title"]
main.title.args$main.title = NULL
names(main.title.args) = substr(names(main.title.args), 7, nchar(names(main.title.args)))
names(main.title.args) = substr(names(main.title.args), 12, nchar(names(main.title.args)))
warning("The 'main.title' argument of 'tm_layout()' is deprecated as of tmap 4.0. Please use 'tm_title()' instead.", call. = FALSE)
args$main.title = NULL
do.call(tm_title, c(list(text = main.title), main.title.args))
Expand Down

0 comments on commit 6c8de25

Please sign in to comment.