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

Function resetViewState

test/interaction/map-controller.spec.ts:63–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61
62// Reset view state before each test
63async function resetViewState() {
64 deck!.setProps({
65 initialViewState: {
66 longitude: -122,
67 latitude: 38,
68 zoom: 10,
69 pitch: 30,
70 bearing: -45
71 }
72 });
73 // Wait for any ongoing animations/transitions to complete
74 // Previous tests may have triggered zoom animations that need time to finish
75 await sleep(500);
76}
77
78test('MapController pan', async () => {
79 await resetViewState();

Callers 1

Calls 2

sleepFunction · 0.70
setPropsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…