bkkhack / hackmap

App to help collaboration at hacknights.
https://bkkhack.github.io/hackmap/
MIT License
10 stars 9 forks source link

update how we calculate avatar drop coordinates #58

Closed waf closed 6 years ago

waf commented 6 years ago

We can't rely on the event's offsetX / offsetY, because that's relative to the event target. The event target may not be the map, due to event bubbling. In the case where it's another avatar, the offsetX/Y are relative to that avatar, so the offsetX/Y values are very small.