How to cancel the link under such conditions?

In the presence of a unit being reference. The link should occur only in the case if you click and leave the cursor was not more than 10px.
If between the events of the cursor passed over 10px, the transition must be locked.

I just downloaded it, just in case here's a picture. Across the radius is not necessary, at least horizontally.
March 19th 20 at 08:30
2 answers
March 19th 20 at 08:32
Anyway, so
but you need to add draggable="false", otherwise when moving mouse clamped, there will be a drag.
March 19th 20 at 08:34
mousedown -> remember the mouse coordinates -> mouseup -> remember the mouse coordinates -> if you right here is 10px necessary that was exactly 10, then find the hypotenuse of this right triangle, then we conclude - allow the transition or not

Find more questions by tags HTMLjQueryJavaScriptCSS