update scrollbar size when adding content

this add a call to the update method inside the refresh function so that the scrollbar update its height as well
I also updated the constructor to only set css width and height when this.x or this.y is true