make changing the direction of Popups easier