Listen to resize events and use client-coordinates instead of page-coordinates

This should fix wrong rotation behaviour when the page is scrolled or when the canvas was resized. The latter needs an explicit trigger (a ```resizeCanvas```-event).