worldmap-viewer
git clone https://git.godosa.eu/worldmap-viewer
master
history zip tar.gz
raw · 189 bytes
1 2 3 4
// input.js — tell a click from a drag export function isClick(down, up, maxPx = 5, maxMs = 600) { return Math.hypot(up.x - down.x, up.y - down.y) <= maxPx && up.t - down.t <= maxMs; }