fix(window-size): Don't set size to decimal numbers

This commit is contained in:
Ben Gotow 2015-10-05 17:55:44 -07:00
parent 45b654ae74
commit 355751973e

View file

@ -593,12 +593,12 @@ class Atom extends Model
MAX_WIDTH = 1440 MAX_WIDTH = 1440
if width > MAX_WIDTH if width > MAX_WIDTH
x = (width - MAX_WIDTH) / 2 x = Math.floor((width - MAX_WIDTH) / 2)
width = MAX_WIDTH width = MAX_WIDTH
MAX_HEIGHT = 900 MAX_HEIGHT = 900
if height > MAX_HEIGHT if height > MAX_HEIGHT
y = (height - MAX_HEIGHT) / 2 y = Math.floor((height - MAX_HEIGHT) / 2)
height = MAX_HEIGHT height = MAX_HEIGHT
{x, y, width, height} {x, y, width, height}