Make viewport size multiple of grid size