Update rectangle on mouse motion