1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

Fix distance calculation in picker

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3279
This commit is contained in:
Raymond Hill 2024-07-05 10:20:33 -04:00
parent 8c5918dec7
commit 9569969b55
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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: