Skip to content

Commit

Permalink
fix bug (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
reczkok authored Nov 12, 2024
1 parent 18b80f0 commit a4792a8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ window.addEventListener('mouseup', () => {
uiState.lastPos = null;
});

canvas.addEventListener('touchend', () => {
uiState.lastPos = null;
});

function centerImage(data: number[]) {
const mass = data.reduce((acc, value) => acc + value, 0);
const x = data.reduce((acc, value, i) => acc + value * (i % SIZE), 0) / mass;
Expand Down

0 comments on commit a4792a8

Please sign in to comment.