This should generally prevent ImageHoverHUD from appearing when a user mouses over a token and begins dragging it. If the user moves their mouse slowly enough, the callback from setTimeout will fire, and the HUD will be shown while they are intending on moving the token.
Why is it necessary?
It can be a bit of a confusing experience when the user starts dragging their token, and pauses to think about where to take it, and ImageHoverHUD is shown on the screen. This is more of an issue when the centered position is used, obviously. For some users, this can seem like a "buggy" experience.
Notes & Considerations
I took a look at the events and hooks available from Foundry and it didn't appear there was anything more appropriate than old-school onmouseleave-etc events. Let me know if you know of a better approach offered by Foundry and I'd be happy to adjust the PR.
If unsolicited PRs like this are unwelcome, let me know and I'll close it right away
What behavior does this introduce?
This should generally prevent ImageHoverHUD from appearing when a user mouses over a token and begins dragging it. If the user moves their mouse slowly enough, the callback from
setTimeout
will fire, and the HUD will be shown while they are intending on moving the token.Why is it necessary?
It can be a bit of a confusing experience when the user starts dragging their token, and pauses to think about where to take it, and
ImageHoverHUD
is shown on the screen. This is more of an issue when the centered position is used, obviously. For some users, this can seem like a "buggy" experience.Notes & Considerations
onmouseleave
-etc events. Let me know if you know of a better approach offered by Foundry and I'd be happy to adjust the PR.