|
|
@ -54,7 +54,10 @@ function calculateToNext( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
throw new Error("Illegal state"); |
|
|
|
return { |
|
|
|
current: 0, |
|
|
|
max: 1, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function programReducer(state: ProgressState, change: ProgressChange) { |
|
|
@ -91,10 +94,6 @@ function programReducer(state: ProgressState, change: ProgressChange) { |
|
|
|
steps[currentIndex].actualDuration = diffLinearValues(lastValue, lastTransition); |
|
|
|
currentIndex += 1; |
|
|
|
lastTransition = lastValue; |
|
|
|
|
|
|
|
if (currentIndex < steps.length) { |
|
|
|
toNext = calculateToNext(steps[currentIndex], lastValue, lastTransition); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|