src/components/TimeTravel/TimeTravel.js
function maxDurationMsPerTimelinePx(earliestTimestamp) {
  const durationMsLowerBound = minDurationMsPerTimelinePx();
  const durationMsUpperBound = moment.duration(3, 'days').asMilliseconds();
  const durationMs = availableTimelineDurationMs(earliestTimestamp) / 400.0;
  return clamp(durationMs, durationMsLowerBound, durationMsUpperBound);
}
function maxDurationMsPerTimelinePx(earliestTimestamp) {
  const durationMsLowerBound = minDurationMsPerTimelinePx();
  const durationMsUpperBound = moment.duration(3, 'days').asMilliseconds();
  const durationMs = availableTimelineDurationMs(earliestTimestamp) / 400.0;
  return clamp(durationMs, durationMsLowerBound, durationMsUpperBound);
}
function maxDurationMsPerTimelinePx ( earliestTimestamp ) { const durationMsLowerBound = minDurationMsPerTimelinePx ( ) ; const durationMsUpperBound = moment . duration ( 3 , 'days' ) . asMilliseconds ( ) ; const durationMs = availableTimelineDurationMs ( earliestTimestamp ) / 400.0 ; return clamp ( durationMs , durationMsLowerBound , durationMsUpperBound ) ; }
Maximum level we can zoom out is such that the available range takes 400px. The 3 days per pixel upper bound on that scale is to prevent ugly rendering in extreme cases.
Maximum level we can zoom out is such that the available range takes 400px . The 3 days per pixel upper bound on that scale is to prevent ugly rendering in extreme cases .