now the zooming will still be correct when the window is resized