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
| Parameter | Type | Description |
|---|---|---|
layerNameOrId | string | The layer name or layer ID |
styleByLens | boolean | True 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