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

Function watchMapMove

modules/mapbox/src/deck-utils.ts:82–93  ·  view source on GitHub ↗
(deck: Deck, map: Map & {__deck?: Deck | null})

Source from the content-addressed store, hash-verified

80}
81
82function watchMapMove(deck: Deck, map: Map & {__deck?: Deck | null}) {
83 const _handleMapMove = () => {
84 if (deck.isInitialized) {
85 // call view state methods
86 onMapMove(deck, map);
87 } else {
88 // deregister itself when deck is finalized
89 map.off('move', _handleMapMove);
90 }
91 };
92 map.on('move', _handleMapMove);
93}
94
95export function removeDeckInstance(map: Map & {__deck?: Deck | null}) {
96 map.__deck?.finalize();

Callers 1

getDeckInstanceFunction · 0.85

Calls 1

onMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…