Skip to content

Commit dacb8ea

Browse files
author
Tim Appelhans
committed
hide legends corresponding to hidden layers if present. Closes #450
1 parent 933a020 commit dacb8ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

R/ops.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ setMethod("+",
7777
ind = hbcalls[zf]
7878
if (length(zf) > 0) m$x$calls[ind] = NULL
7979
m = leafem:::addZoomFullButton(m, out_obj)
80+
81+
hide_idx = getCallEntryFromMap(m, "hideGroup")
82+
if (length(hide_idx) > 0) {
83+
hide_lst = m$x$calls[hide_idx]
84+
m$x$calls[hide_idx] = NULL
85+
m$x$calls = append(m$x$calls, hide_lst)
86+
}
8087
}
8188

8289
if (mapviewGetOption("platform") == "mapdeck") {

0 commit comments

Comments
 (0)