l_layer_isVisible: Return visibility flag of layer

Description Usage Arguments Details Value See Also Examples

View source: R/l_layer.R

Description

Hidden or invisible layers are not rendered. This function queries whether a layer is visible/rendered or not.

Usage

1
l_layer_isVisible(widget, layer)

Arguments

widget

widget path or layer object of class 'l_layer'

layer

layer id. If the widget argument is of class 'l_layer' then the layer argument is not used

Details

Visibile layers are rendered, invisible ones are not. If any ancestor of a layer is set to be invisible then the layer is not rendered either. The layer visibility flag can be checked with l_layer_isVisible and the actual visibility (i.e. are all the ancesters visibile too) can be checked with l_layer_layerVisibility.

Note that layer visibility is not a state of the layer itself, instead is information that is part of the layer collection (i.e. its parent widget).

Value

TRUE or FALSE depending whether the layer is visible or not.

See Also

l_layer, l_layer_show, l_layer_hide, l_layer_layerVisibility, l_layer_groupVisibility

Examples

1
2
3
4
5
6
7
8
9
if(interactive()){

p <- l_plot()
l <- l_layer_rectangle(p, x=0:1, y=0:1)
l_layer_isVisible(p, l)
l_layer_hide(p, l)
l_layer_isVisible(p, l)

}

loon documentation built on June 14, 2021, 9:07 a.m.