Viewport is not always the window itself

The viewport is not always the window, but sometimes a portion of a window. For example when you are working in a specific SPA, it might be a specific block element on a page.

With this change, it is possible to introduce a different calculation method for the viewport height through the viewportHeight options parameter. This option is a function that takes the items as its argument.