prometheus/promdash — pull request #36 by stuartnelson3 (2014-01-09 20:52:01+00:00)
Title: Fullest screen

Enable support for fullscreen API

There are some caveats to this:

1. I'm using a jquery selector to target the element that gets enlarged to full screen. Not a fan of using selectors, but can't think of another way atm.
2. There's a 500ms delay on the redraw to allow for entering and exiting full screen mode. I tried to see if there was callback functionality, but didn't see anything. It seems to work "reliably" for me when using chrome and firefox on my mbp, but I don't know how full screen transition times differ between machines. So, non-determinism is where it is stuck right now. Let me know if the delay needs to increase or (preferably) you find some sort of callback functionality. Using firefox I was able to have the exit fullscreen and have the graphs re-render themselves on the next cycle (0ms timeout), but it didn't work in chrome.
3. Entering fullscreen mode hijacks the use of the escape button for exiting fullscreen. Because of this, hitting escape would (and still does) exit full screen, but the handler we were using was not being fired. This means that the graphs weren't being re-rendered on leaving fullscreen mode, consequently leaving them all weird. I wasn't able to find a way to fix this other than to designate the space bar as the new "exit fullscreen" button.

So. Some cool stuff, but it definitely isn't perfect. Thoughts?