MCPcopy
hub / github.com/visgl/deck.gl / setLayers

Method setLayers

modules/core/src/lib/layer-manager.ts:191–203  ·  view source on GitHub ↗

Supply a new layer list, initiating sublayer generation and layer matching

(newLayers: LayersList, reason?: string)

Source from the content-addressed store, hash-verified

189
190 /** Supply a new layer list, initiating sublayer generation and layer matching */
191 setLayers(newLayers: LayersList, reason?: string): void {
192 debug(TRACE_SET_LAYERS, this, reason, newLayers);
193
194 this._lastRenderedLayers = newLayers;
195
196 const flatLayers = flatten(newLayers, Boolean) as Layer[];
197
198 for (const layer of flatLayers) {
199 layer.context = this.context;
200 }
201
202 this._updateLayers(this.layers, flatLayers);
203 }
204
205 /** Update layers from last cycle if `setNeedsUpdate()` has been called */
206 updateLayers(): void {

Callers 15

initializeLayerManagerFunction · 0.95
updateLayersMethod · 0.95
testPickingLayerFunction · 0.95
cleanupAfterLayerTestsFunction · 0.80
runLayerTestUpdateFunction · 0.80
picking.spec.tsFile · 0.80

Calls 3

_updateLayersMethod · 0.95
flattenFunction · 0.90
debugFunction · 0.85

Tested by 2

preRenderWithLayersFunction · 0.64
preRenderWithLayersFunction · 0.64