If the browser window is resized when the tab is not active, the page will not receive any resize events, hence we will not recalculate positions of annotations.
To make sure the positions are not off, we should recalculate them when the tab is activated (i.e. user views the page).