yoannmoinet / nipplejs

:video_game: A virtual joystick for touch capable interfaces.
https://yoannmoinet.github.io/nipplejs
MIT License
1.77k stars 181 forks source link

fix(zone): handle offset when parent is flex #182

Closed yoannmoinet closed 2 years ago

yoannmoinet commented 2 years ago

Fixes https://github.com/yoannmoinet/nipplejs/issues/181

When the parent is display: flex somehow the offset is wrong. I suspect that the context of the getBoundingBox is inexistant in flex mode.

The solution would be to remove that offset when we detect that the parent is display: flex.