Resizes the object to the width and height of its container.
Returns number of milliseconds it took to resize.
method is often called internally, but it is not limited to internal use only. You
do not need to call this method when window is resized by the user, because the library already has an event listener for it. But
you need to call it when you change the size of the container.