Eriku33 / Foundry-VTT-Image-Hover

Character art module for Foundry Virtual Table top
MIT License
7 stars 12 forks source link

Console error fixes, single event triggered on key down #6

Closed DFreds closed 3 years ago

DFreds commented 3 years ago

The first commit handles issues where there are multiple tokens on initially loading a scene. The console log was reporting an error stating that img is not defined for each token (createToken is called on initial startup). This seemed to only occur with a lot of tokens.

The second commit makes it so that holding down 'v' (or whatever keybind) will only trigger the keydown event once, instead of over and over again while you hold the key down. This makes it so you have to hover over the token first before pressing v before image hover triggers, so let me know if you'd prefer not to use this commit and I can remove it.

DFreds commented 3 years ago

lol ooookay then