Fix annotations placement

Resize was bound to document rather than window.