2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
8 (function ($, Drupal, Backbone) {
9 Drupal.toolbar.BodyVisualView = Backbone.View.extend({
10 initialize: function initialize() {
11 this.listenTo(this.model, 'change:activeTray ', this.render);
12 this.listenTo(this.model, 'change:isFixed change:isViewportOverflowConstrained', this.isToolbarFixed);
14 isToolbarFixed: function isToolbarFixed() {
15 var isViewportOverflowConstrained = this.model.get('isViewportOverflowConstrained');
16 $('body').toggleClass('toolbar-fixed', isViewportOverflowConstrained || this.model.get('isFixed'));
18 render: function render() {
19 $('body').toggleClass('toolbar-tray-open', !!this.model.get('activeTray'));
22 })(jQuery, Drupal, Backbone);