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

Method setProps

modules/mapbox/src/mapbox-overlay.ts:69–86  ·  view source on GitHub ↗

Update (partial) props of the underlying Deck instance.

(props: MapboxOverlayProps)

Source from the content-addressed store, hash-verified

67
68 /** Update (partial) props of the underlying Deck instance. */
69 setProps(props: MapboxOverlayProps): void {
70 if (this._interleaved && props.layers) {
71 this._resolveLayers(this._map, this._deck, this._props.layers, props.layers);
72 }
73
74 Object.assign(this._props, this.filterProps(props));
75
76 if (this._deck && this._map) {
77 this._deck.setProps({
78 ...this._props,
79 views: this._getViews(this._map),
80 parameters: {
81 ...getDefaultParameters(this._map, this._interleaved),
82 ...this._props.parameters
83 }
84 });
85 }
86 }
87
88 // The local Map type is for internal typecheck only. It does not necesarily satisefy mapbox/maplibre types at runtime.
89 // Do not restrict the argument type here to avoid type conflict.

Callers 1

Calls 5

_resolveLayersMethod · 0.95
filterPropsMethod · 0.95
_getViewsMethod · 0.95
getDefaultParametersFunction · 0.90
setPropsMethod · 0.65

Tested by

no test coverage detected