All but the 'model'
and the 'root'
layer can be
dynamically deleted. If a group layer gets deleted with
l_layer_delete
then all its children layers get moved into their
grandparent group layer.
l_layer_delete(widget, layer)
widget | widget path or layer object of class |
---|---|
layer | layer id. If the widget argument is of class |
0 if success otherwise the function throws an error
if(interactive()){ p <- l_plot() l1 <- l_layer_rectangle(p, x = 0:1, y = 0:1, color='red') l_layer_delete(l1) l2 <- l_layer_rectangle(p, x = 0:1, y = 0:1, color='yellow') l_layer_delete(p,l2) }