add resize and rotate event listeners