Skip to content

Commit

Permalink
Fix distance calculation in picker
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jul 5, 2024
1 parent 8c5918d commit 9569969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/epicker-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const onSvgTouch = (( ) => {
const stopY = ev.changedTouches[0].screenY;
const angle = Math.abs(Math.atan2(stopY - startY, stopX - startX));
const distance = Math.sqrt(
Math.pow(stopX - startX, 2),
Math.pow(stopX - startX, 2) +
Math.pow(stopY - startY, 2)
);
// Interpret touch events as a tap if:
Expand Down

0 comments on commit 9569969

Please sign in to comment.