Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong walk leg start time #829

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions app/component/WalkLeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,7 @@ import DelayedTime from './DelayedTime';
import WalkSteps from './WalkSteps';

function WalkLeg(
{
children,
focusAction,
focusToLeg,
focusToStep,
index,
leg,
previousLeg,
startTime,
},
{ children, focusAction, focusToLeg, focusToStep, index, leg, previousLeg },
{ config, intl },
) {
const distance = displayDistance(
Expand Down Expand Up @@ -112,7 +103,7 @@ function WalkLeg(
<DelayedTime
leg={previousLeg}
delay={previousLeg && previousLeg.arrivalDelay}
startTime={startTime}
startTime={leg.mode === 'WALK' ? leg.startTime : leg.endTime}
/>
</div>
</div>
Expand Down Expand Up @@ -400,9 +391,6 @@ WalkLeg.propTypes = {
previousLeg: walkLegShape,
focusToLeg: PropTypes.func.isRequired,
focusToStep: PropTypes.func.isRequired,
// This is not necessarily the `leg`'s start time!
// Usually, it seems to be the previous leg's end time.
startTime: PropTypes.number.isRequired,
};

WalkLeg.defaultProps = {
Expand Down
Loading