Skip to content

gi-nx


gi-nx / setLayerStyleByLens

ts
function setLayerStyleByLens(layerNameOrId: string, styleByLens: boolean): void;

Choose whether a layer draws itself from its saved lens or from its own style. updateLayerStyle sets this implicitly whenever the style it is given holds a display key; use this to control it on its own.

Parameters ​

ParameterTypeDescription
layerNameOrIdstringThe layer name or layer ID
styleByLensbooleanTrue to draw the layer from its lens, false to use the layer's style

Returns ​

void

Throws ​

Error if the layer is not in the tree