1052 | | // @todo Note that wp.customize.reflowPaneContents() is debounced, so this immediate change will show a slight flicker while priorities get updated. |
1053 | | api.control( 'nav_menu[' + String( section.params.menu_id ) + ']' ).reflowMenuItems(); |
1054 | | } |
| 1052 | if ( ! newSection || newSection.id !== section.id ) { |
| 1053 | return false; |
| 1054 | } |
| 1055 | |
| 1056 | if ( 'resolved' !== section.deferred.initSortables.state() ) { |
| 1057 | |
| 1058 | _.delay( function() { |
| 1059 | wpNavMenu.initSortables(); // Depends on menu-to-edit ID being set above. |
| 1060 | section.deferred.initSortables.resolve( wpNavMenu.menuList ); // Now MenuControl can extend the sortable. |
| 1061 | |
| 1062 | // @todo Note that wp.customize.reflowPaneContents() is debounced, so this immediate change will show a slight flicker while priorities get updated. |
| 1063 | api.control( 'nav_menu[' + String( section.params.menu_id ) + ']' ).reflowMenuItems(); |
| 1064 | }, 250 ); |
| 1065 | } |
| 1066 | }, section ) ); |