Update viewport and directive close-menu