give edit_menu a direction parameter to support avoiding nearby points