Skip to content

Commit

Permalink
hide legends corresponding to hidden layers if present. Closes #450
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Appelhans committed Apr 17, 2024
1 parent 933a020 commit dacb8ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/ops.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ setMethod("+",
ind = hbcalls[zf]
if (length(zf) > 0) m$x$calls[ind] = NULL
m = leafem:::addZoomFullButton(m, out_obj)

hide_idx = getCallEntryFromMap(m, "hideGroup")
if (length(hide_idx) > 0) {
hide_lst = m$x$calls[hide_idx]
m$x$calls[hide_idx] = NULL
m$x$calls = append(m$x$calls, hide_lst)
}
}

if (mapviewGetOption("platform") == "mapdeck") {
Expand Down

0 comments on commit dacb8ea

Please sign in to comment.