resizing viewport on resizeevent