Skip to content

Commit 1df9bef

Browse files
artoonieskaphan
andauthored
Fix pie autoplay (#621)
* Fix pie chart auto-play stopping on no-transfer rounds Add resumeFrom() to round player so the pie chart can advance the dropdown during auto-play without stopping playback. When the pie chart skips a round with no transfers, updateRound() now calls resumeFrom() instead of setStep() to keep the animation going. Co-Authored-By: Claude Opus 4.6 * Simplify auto-play fix: just skip setStep during playback Revert round-player.js changes. The simpler approach is to skip the setStep() call entirely during auto-play so it does not stop playback. The round player timer catches up on its next tick. Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: skaphan <skaphan@gmail.com>
1 parent f691a50 commit 1df9bef

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

templates/pie/pie-nonblocking.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@
5050
// When the pie chart is animating it knows it is advancing rounds, but to avoid reactive
5151
// loops it requests to be told the new currentRound rather than using 2-way binding.
5252
// And we also update the slider state while we're at it.
53+
//
54+
// During auto-play, skip the setStep() call — it stops playback.
55+
// The round player's timer will catch up on its next tick.
5356
function updateRound(roundNum) {
5457
pieChart.currentRound = roundNum;
55-
pieRoundPlayer.setStep(roundNum - 1);
58+
if (!pieRoundPlayer.playing()) {
59+
pieRoundPlayer.setStep(roundNum - 1);
60+
}
5661
}
5762

5863
</script>

0 commit comments

Comments
 (0)