Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2671 slow down tour animations (#4219)

Tom Cariello35428220553a
diff --git a/e2e/features/events/event-test.spec.js b/e2e/features/events/event-test.spec.js
index 11bb75563..6998ed5ca 100644
--- a/e2e/features/events/event-test.spec.js
+++ b/e2e/features/events/event-test.spec.js
@@ -52,6 +52,7 @@ test('Selecting event shows track points and markers which are not visible when
const { secondEvent, trackMarker, eventIcons, eventsTab, layersTab } = selectors
await page.waitForTimeout(1000)
await secondEvent.click()
+ await page.waitForTimeout(5000)
await expect(trackMarker).toHaveCount(5)
await layersTab.click()
await expect(trackMarker).not.toBeVisible()
@@ -67,6 +68,7 @@ test('Clicking an event in the list selects the event', async ({ browserName })
await page.goto(mockEvents)
await page.waitForLoadState('networkidle')
await firstEvent.click()
+ await page.waitForTimeout(5000)
await expect(selectedFirstEvent).toBeVisible()
})
@@ -96,5 +98,6 @@ test('Clicking selected event deselects event', async ({ browserName }) => {
test.skip(browserName === 'firefox', 'firefox cant find iceberg event sometimes')
const { selectedFirstEvent } = selectors
await selectedFirstEvent.click()
+ await page.waitForTimeout(5000)
await expect(selectedFirstEvent).not.toBeVisible()
})
diff --git a/web/js/map/util.js b/web/js/map/util.js
index d445e27ea..362b37498 100644
--- a/web/js/map/util.js
+++ b/web/js/map/util.js
@@ -156,7 +156,7 @@ export function fly (map, proj, endPoint, endZoom = 5, rotation = 0) {
const line = new OlGeomLineString([startPoint, endPoint]);
const distance = line.getLength(); // In map units, which is usually degrees
const distanceDuration = polarProjectionCheck ? distance / 50000 : distance; // limit large polar projection distances from coordinate transforms
- let duration = Math.floor(distanceDuration * 20 + 1000); // approx 6 seconds to go 360 degrees
+ let duration = Math.max(5000, 2 * Math.floor(distanceDuration * 20 + 1000)); // Minimum 5 seconds, approx 12 seconds to go 360 degrees
const animationPromise = function(...args) {
return new Promise((resolve, reject) => {