<commit_before>GeotriggerEditor.module('Layouts', function(Layouts, App, Backbone, Marionette, $, _) {

  // Layout Drawer View
  // ------------------

  Layouts.Drawer = Backbone.Marionette.Layout.extend({
    template: App.Templates['drawer-list'],
    className: 'gt-panel-wrap',

    events: {
      'click .gt-back-to-list' : 'backToList',
      'click .gt-close-drawer' : 'closeDrawer'
    },

    regions: {
      listRegion : '.gt-panel-list',
      editRegion : '.gt-panel-edit'
    },

    initialize: function() {
      this.listenTo(App.vent, 'drawer:list:toggle', this.toggleDrawer);
      this.listenTo(App.vent, 'drawer:list:reset-buttons', this.resetButtons);
      this.listenTo(App.vent, 'drawer:close', this.closeDrawer);
    },

    toggleDrawer: function() {
      this.resetButtons();
      this.$el.parent().toggleClass('gt-open');
    },

    backToList: function(e) {
      e.preventDefault();
      this.$el.removeClass('gt-panel-editing');
    },

    resetButtons: function() {
      this.$el.find('.gt-item-confirm-delete').removeClass('gt-item-confirm-delete');
      this.$el.find('.gt-reset-delete').removeClass('gt-reset-flyout');
    },

    closeDrawer: function(e) {
      if (typeof e !== 'undefined' && e.preventDefault) {
        e.preventDefault();
      }

      this.$el.parent().removeClass('gt-open');

      App.vent.trigger('controls:restore-shape');
      App.vent.trigger('controls:deactivate', 'list');
    }
  });

});
<commit_msg>list drawer opening makes map smaller<commit_after>GeotriggerEditor.module('Layouts', function(Layouts, App, Backbone, Marionette, $, _) {

  // Layout Drawer View
  // ------------------

  Layouts.Drawer = Backbone.Marionette.Layout.extend({
    template: App.Templates['drawer-list'],
    className: 'gt-panel-wrap',

    events: {
      'click .gt-back-to-list' : 'backToList',
      'click .gt-close-drawer' : 'closeDrawer'
    },

    regions: {
      listRegion : '.gt-panel-list',
      editRegion : '.gt-panel-edit'
    },

    initialize: function() {
      this.listenTo(App.vent, 'drawer:list:toggle', this.toggleDrawer);
      this.listenTo(App.vent, 'drawer:list:reset-buttons', this.resetButtons);
      this.listenTo(App.vent, 'drawer:close', this.closeDrawer);
    },

    toggleDrawer: function() {
      this.resetButtons();
      this.$el.parent().toggleClass('gt-open');
      $('#gt-map-region').toggleClass('gt-open-drawer');
      App.map.invalidateSize();
    },

    backToList: function(e) {
      e.preventDefault();
      this.$el.removeClass('gt-panel-editing');
    },

    resetButtons: function() {
      this.$el.find('.gt-item-confirm-delete').removeClass('gt-item-confirm-delete');
      this.$el.find('.gt-reset-delete').removeClass('gt-reset-flyout');
    },

    closeDrawer: function(e) {
      if (typeof e !== 'undefined' && e.preventDefault) {
        e.preventDefault();
      }

      this.$el.parent().removeClass('gt-open');

      App.vent.trigger('controls:restore-shape');
      App.vent.trigger('controls:deactivate', 'list');

      $('#gt-map-region').removeClass('gt-open-drawer');
      App.map.invalidateSize();
    }
  });

});

{'fraction_non_alphanumeric': 0.19387432901799811, 'fraction_numerical': 0.0, 'mean_word_length': 2.868131868131868, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1845295', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1027, 'n_words': 131}