Fix to us Math.round rather than parseInt.

getComputedStyle returned 265.9999997 therefore rounded down to 265 with parseInt.  This broke the state function which would return "closed" in any state.