Skip to content

Commit

Permalink
Fixing loop setting. (#535)
Browse files Browse the repository at this point in the history
* Fixing loop setting.

* Cleanup.

* Fixed bug.

* revert this

* same thing

* comment

---------

Co-authored-by: Shane Smiskol <[email protected]>
  • Loading branch information
0x7B5 and sshane authored Jul 16, 2024
1 parent 6600dfc commit b6464b6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/reducers/globalState.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ export default function reducer(_state, action) {
end: state.currentRoute.duration,
previous: state.zoom,
}

// fix loop on last zoom level
state.loop = null;
} else {
state.zoom = {
start: action.start,
Expand All @@ -318,13 +321,6 @@ export default function reducer(_state, action) {
start: state.currentRoute.start_time_utc_millis,
end: state.currentRoute.end_time_utc_millis,
};

if (!state.loop) {
state.loop = {
startTime: state.zoom.start,
duration: state.zoom.end - state.zoom.start,
};
}
} else {
state.zoom = null;
state.loop = null;
Expand Down

0 comments on commit b6464b6

Please sign in to comment.