Skip to content

Commit

Permalink
Merge pull request #300 from tonybaloney/reset_previous_ball_state
Browse files Browse the repository at this point in the history
Reset previous ball on rethrow
  • Loading branch information
tonybaloney authored Nov 1, 2022
2 parents 8ef37d2 + 3f4a205 commit 9c7c05c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions media/main-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,9 @@ function petPanelApp(basePetUri, theme, themeKind, petColor, petSize, petType, s
let then = 0; // last draw
var ballState;
function resetBall() {
if (ballState) {
ballState.paused = true;
}
if (canvas) {
canvas.style.display = 'block';
}
Expand Down
3 changes: 3 additions & 0 deletions src/panel/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ export function petPanelApp(
var ballState: BallState;

function resetBall() {
if (ballState) {
ballState.paused = true;
}
if (canvas) {
canvas.style.display = 'block';
}
Expand Down

0 comments on commit 9c7c05c

Please sign in to comment.