VaxGame
VaxGame copied to clipboard
In Chrome graph does not fit to browser window
If you reduce the width of the browser window, the graph will reduce in size to fit - it seems to be setting the size from the width and/or screen height, rather than window viewport height (although viewing in fullscreen mode does not help).
I'm also seeing this issue. Here's how it looks/adjusts on my machine:
Setting width
and height
with window.innerWidth
and window.innerHeight
on load
and resize
should do the trick, see: https://github.com/salathegroup/VaxGame/blob/master/app/assets/javascripts/game.js#L586-L614