Skip to content

Commit

Permalink
Merge branch 'main' of github.com:zweidenker/polly
Browse files Browse the repository at this point in the history
  • Loading branch information
christian2denker committed Oct 1, 2024
2 parents c374d26 + f544b04 commit 4ede215
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,10 @@
let lastThumbPosition = { x: 150, y: 50 };
const needleLength = 75; // Constant length for the needle
let entity = null; // apptive entitiy
// Desktop event listeners
thumb.addEventListener('mousedown', startDrag);
document.addEventListener('mousemove', onDrag);
document.addEventListener('mouseup', endDrag);

// Mobile event listeners
thumb.addEventListener('touchstart', startDrag);
document.addEventListener('touchmove', onDrag);
document.addEventListener('touchend', endDrag);
// Pointer event listeners
thumb.addEventListener('pointerdown', startDrag);
document.addEventListener('pointermove', onDrag);
document.addEventListener('pointerup', endDrag);

function startDrag(e) {
e.preventDefault();
Expand Down

0 comments on commit 4ede215

Please sign in to comment.