Dragging Chat Offscreen
Opened this issue · 2 comments
valkyrienyanko commented
Describe the Bug
Dragging the chat off screen increases the client window size.
Steps to Reproduce
Drag the chat off screen in game. Follow the steps in the readme to setup a client and server.
Expected behavior
Dragging the chat off screen shouldn't be allowed.
Suggestions
If the chat is getting in the users way, perhaps add a minimize button?
Screenshots
valkyrienyanko commented
https://editor.p5js.org/aferriss/sketches/r101Sc2_f
This may make things easier for mouse detection on a minimize window button.
JohnTendik commented
You could also clamp the x and y values to window.offsetHeight
and window.offsetWidth
. You will have to do something about the chat position on resize of the window however. I can create a PR tonight as an example.