Skip to content

Commit

Permalink
fix: fix O/D Matrix for trainrun 0 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
shenriotpro authored Nov 5, 2024
1 parent 15e56ae commit 28a6d3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/view/util/origin-destination-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ const buildSectionEdgesFromIterator = (
tsIterator.next();
const ts = tsIterator.current().trainrunSection;
const trainrunId = reverseIterator
? -ts.getTrainrunId()
? // Minus 1 so we don't conflate 0 with -0.
-ts.getTrainrunId() - 1
: ts.getTrainrunId();
const reverseSection =
tsIterator.current().node.getId() !== ts.getTargetNodeId();
Expand Down

0 comments on commit 28a6d3a

Please sign in to comment.