We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 129848b commit 607d5dcCopy full SHA for 607d5dc
modules/react-mapbox/src/mapbox/mapbox.ts
@@ -340,6 +340,15 @@ export default class Mapbox {
340
this._proxyTransform.$internalUpdate = false;
341
this._fireDefferedEvents();
342
};
343
+ // eslint-disable-next-line @typescript-eslint/unbound-method
344
+ const jumpTo = map.jumpTo;
345
+ map.jumpTo = (...args: Parameters<MapInstance['jumpTo']>) => {
346
+ // This method will fire view state change events immediately
347
+ this._proxyTransform.$internalUpdate = true;
348
+ jumpTo.apply(map, args);
349
+ this._proxyTransform.$internalUpdate = false;
350
+ return map;
351
+ };
352
// Insert code into map's event pipeline
353
// eslint-disable-next-line @typescript-eslint/unbound-method
354
const fireEvent = map.fire;
0 commit comments