Skip to content

Commit

Permalink
Don't overwrite walking movements while generating cycling in JAT
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Nov 20, 2024
1 parent 3fa8380 commit 1f88a02
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/routes/route_check/jat_check/EditJunction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@
function autogenerateMovements() {
if (
$state.jat[junctionIdx][stage].movements.length > 0 &&
!window.confirm(`Overwrite all movements?`)
!window.confirm(`Overwrite all cycling movements?`)
) {
return;
}
$state.jat[junctionIdx][stage].movements = generateMovements(
$state.jat[junctionIdx][stage].arms,
let ww = $state.jat[junctionIdx][stage].movements.filter(
(m) => m.kind == "walking & wheeling",
);
$state.jat[junctionIdx][stage].movements = [
...ww,
...generateMovements($state.jat[junctionIdx][stage].arms),
];
}
</script>

Expand Down

0 comments on commit 1f88a02

Please sign in to comment.