2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
8 (function ($, Backbone, Drupal) {
9 Drupal.toolbar.MenuVisualView = Backbone.View.extend({
10 initialize: function initialize() {
11 this.listenTo(this.model, 'change:subtrees', this.render);
13 render: function render() {
16 var subtrees = this.model.get('subtrees');
18 Object.keys(subtrees || {}).forEach(function (id) {
19 _this.$el.find('#toolbar-link-' + id).once('toolbar-subtrees').after(subtrees[id]);
22 if ('drupalToolbarMenu' in $.fn) {
23 this.$el.children('.toolbar-menu').drupalToolbarMenu();
27 })(jQuery, Backbone, Drupal);