Skip to content

Commit

Permalink
WV-2852 Tour Story Transition Duration Adjustment (#4784)
Browse files Browse the repository at this point in the history
* Adjusted transition duration timing

* Fixed tests
  • Loading branch information
christof-wittreich authored Nov 13, 2023
1 parent ca85c58 commit b9f38ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion e2e/features/events/event-test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ test('Check that 4 fire layers are now present', async ({ browserName }) => {
await modalCloseButton.click()
await sidebarEvent.click()
await layersTab.click()
await page.waitForTimeout(1000)
await expect(thermAnomSNPPday).toBeVisible()
await expect(thermAnomSNPPnight).toBeVisible()
await expect(thermAnomVIIRSday).toBeVisible()
Expand Down Expand Up @@ -71,7 +72,7 @@ test('Clicking an event in the list selects the event', async ({ browserName })
const { firstEvent, selectedFirstEvent } = selectors
await page.waitForLoadState('networkidle')
await firstEvent.click()
await page.waitForTimeout(5000)
await page.waitForTimeout(6000)
await expect(selectedFirstEvent).toBeVisible()
})

Expand Down
2 changes: 1 addition & 1 deletion web/js/map/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function fly (map, proj, endPoint, endZoom = 5, rotation = 0, isKioskMode
const distanceDuration = polarProjectionCheck ? distance / 50000 : distance; // limit large polar projection distances from coordinate transforms
let duration = isKioskModeActive
? Math.max(5000, 2 * Math.floor(distanceDuration * 20 + 1000)) // Minimum 5 seconds, approx 12 seconds to go 360 degrees
: Math.floor(distanceDuration * 20 + 1000); // approx 6 seconds to go 360 degrees
: Math.min(6000, Math.floor(distanceDuration * (15 * (startZoom + endZoom)) + (100 * (startZoom + endZoom)) + 1000)); // approx 6 seconds to go 360 degrees

const animationPromise = function(...args) {
return new Promise((resolve, reject) => {
Expand Down

0 comments on commit b9f38ad

Please sign in to comment.