Also, mouse/touch is treated by the game as released and shot after dragging beyond the edge due to loss of focus, maybe adding recognition of cursor to edge and treating it as canceled would be better.
Added Z (P1's "O") for toggling the free camera. I also made dragging off screen (on web) cancel the shot—good catch!