l_layer_move.Rd
The postition of a layer in the layer tree determines the
rendering order. That is, the non-group layers are rendered in order of a
Depth-first traversal of the layer tree. The toplevel group layer is called
'root'
.
l_layer_move(widget, layer, parent, index = "0")
widget | widget path or layer object of class |
---|---|
layer | layer id. If the widget argument is of class |
parent | if parent layer is not specified it is set to the current parent layer of the layer |
index | position among its siblings. valid values are 0, 1, 2, ..., 'end' |
0 if success otherwise the function throws an error
p <- l_plot() l <- l_layer_rectangle(p, x=0:1, y=0:1, color="steelblue") g <- l_layer_group(p) l_layer_printTree(p) l_layer_move(l, parent=g) l_layer_printTree(p) l_layer_move(p, 'model', parent=g) l_layer_printTree(p)