Fixed an issue with the Vertical- and HorizontalLayout

`scrollX` and `scrollY` should be set just as all the other parameters (by checking if the viewport parameter is `null`).