Skip to content

Commit

Permalink
Fixed signal move up/down in sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
smariel committed Sep 28, 2024
1 parent c41e7ed commit 34237a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/class.Sequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class SequenceStep {
// search the previous signal of the same type
// for each signal, starting from the previous one, decrement
let prevSignal = null;
for(let i=signal.id-1; i>0; i--) {
for(let i=signal.id-1; i>=0; i--) {
if(this.signals[i].type == signal.type) {
prevSignal = this.signals[i];
break;
Expand All @@ -426,7 +426,7 @@ class SequenceStep {
// search the next signal of the same type
// for each signal, starting from the next one, increment
let nextSignal = null;
for(let i=signal.id+1; i<this.length-1; i++) {
for(let i=signal.id+1; i<this.length; i++) {
if(this.signals[i].type == signal.type) {
nextSignal = this.signals[i];
break;
Expand Down

0 comments on commit 34237a6

Please sign in to comment.