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

Method setProps

modules/core/src/scripting/map-wrapper.ts:41–55  ·  view source on GitHub ↗
(props: Partial<MapProps>)

Source from the content-addressed store, hash-verified

39 }
40
41 setProps(props: Partial<MapProps>) {
42 const oldProps = this.props;
43 const newProps = {...this.props, ...props};
44 this.props = newProps;
45
46 if (!this.map) {
47 return;
48 }
49
50 const needsRedraw = this._update(oldProps, newProps);
51
52 if (needsRedraw) {
53 this.redraw();
54 }
55 }
56
57 // Force redraw the map now. Typically resize() and jumpTo() is reflected in the next
58 // render cycle, which is managed by Mapbox's animation loop.

Callers

nothing calls this directly

Calls 2

_updateMethod · 0.95
redrawMethod · 0.95

Tested by

no test coverage detected