l_layer_promote {loon} | R Documentation |
Moves the layer up to be a left sibling of its parent
Description
Moves the layer down the layer tree (towards the root layer) if the parent layer is not the root layer.
Usage
l_layer_promote(widget, layer)
Arguments
widget |
widget path or layer object of class |
layer |
layer id. If the widget argument is of class |
Value
0 if success otherwise the function throws an error
Examples
if(interactive()){
p <- l_plot()
g1 <- l_layer_group(p)
g2 <- l_layer_group(p, parent=g1)
l1 <- l_layer_oval(p, x=0:1, y=0:1, parent=g2)
l_layer_printTree(p)
l_layer_promote(p, l1)
l_layer_printTree(p)
l_layer_promote(p, l1)
l_layer_printTree(p)
}
[Package loon version 1.4.1 Index]