<commit_before>define(["underscore", "backbone.marionette", "jquery", "jquery.hammer", "communicator",
    "erfgeoviewer.common", "models/state", "tpl!template/new.html",
    "materialize.modal", "materialize.toasts"],
  function(_, Marionette, $, jqueryHammer, Communicator, App,
           State, NewTemplate, MaterializeModal, MaterializeToasts) {

    return Marionette.ItemView.extend({

      template: NewTemplate,

      events: {
        'click .new': 'resetMap'
      },

      onShow: function() {
        $('.modal', this.$el).openModal({
          complete: _.bind(function() {
            App.router.navigate("");
            this.destroy();
          }, this)
        });
      },

      resetMap: function() {
        State.clear();
      }

    });

  }
);<commit_msg>reset map bounding box to predefined values on New map. refs #8932<commit_after>define(["underscore", "backbone.marionette", "jquery", "jquery.hammer", "communicator",
    "erfgeoviewer.common", "models/state", "tpl!template/new.html",
    "materialize.modal", "materialize.toasts"],
  function(_, Marionette, $, jqueryHammer, Communicator, App,
           State, NewTemplate, MaterializeModal, MaterializeToasts) {

    return Marionette.ItemView.extend({

      template: NewTemplate,

      events: {
        'click .new': 'resetMap'
      },

      onShow: function() {
        $('.modal', this.$el).openModal({
          complete: _.bind(function() {
            App.router.navigate("");
            this.destroy();
          }, this)
        });
      },

      resetMap: function() {
        State.clear();

        //reset map bounding box
        Communicator.mediator.trigger('map:resetEditorPosition');
      }

    });

  }
);
{'fraction_non_alphanumeric': 0.1578641903656413, 'fraction_numerical': 0.0023215322112594312, 'mean_word_length': 2.4969574036511157, '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': '1170947', 'n_tokens_mistral': 531, 'n_tokens_neox': 500, 'n_words': 94}