digitalepidemiologylab / VaxGame

network-based vaccination game
81 stars 42 forks source link

In Chrome graph does not fit to browser window #25

Open Alexander-Minyushkin opened 10 years ago

HamboneCoder commented 10 years ago

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).

nickom commented 10 years ago

I'm also seeing this issue. Here's how it looks/adjusts on my machine: vax

PeterTheOne commented 7 years ago

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