Adding window resize support

Now the tooltip will continue to work properly when the window is
resized.