Added keepInViewport option