Correctly translate mouse/touch position for resized canvas.