Added function to modify the viewport dimension