I know that's possible to limit the depth that navigation menu items can be given children like this:
wp_add_inline_script('nav-menu', 'wpNavMenu.options.globalMaxDepth = 1;', 'after');
My issue is that I have three menus, and I only want to limit the depth on two of them. Is it possible to conditionally add the above when particular menus are being administered?
Limiting the depth displayed when actually rendering the menus in my theme is a last resort. I'd rather have the menu created in admin match the menu actually shown.