<commit_before>define([
  'svg',
  'svg.import',
  'backbone',
  'text!../../svg/Map.svg'
], function(
  SVG,
  svgImport,
  Backbone,
  map
) {

  var gameView = Backbone.View.extend({
    id: 'gameView',

    initialize: function() {
      this.showMap();
    },

    showMap: function() {
      var draw = SVG('drawing');
        draw.svg(map)

        var group = SVG.get('Group');
        group.each(function() {
            this.fill('#FF0000').stroke({color: '#000', width: 5})
        });
        group.each(function() {
          this.on('click', function() {
            this.fill('#0000FF');
          });
        })
    },

    nameSpace: "http://www.w3.org/2000/svg",
    _ensureElement: function() {
       if (!this.el) {
          var attrs = _.extend({}, _.result(this, 'attributes'));
          if (this.id) attrs.id = _.result(this, 'id');
          if (this.className) attrs['class'] = _.result(this, 'className');
          var $el = $(window.document.createElementNS(_.result(this, 'nameSpace'), _.result(this, 'tagName'))).attr(attrs);
          this.setElement($el.get(0), false);
       } else {
          this.setElement(_.result(this, 'el'), false);
       }
    },
  })

  return gameView;
});<commit_msg>make svgView superclass<commit_after>define([
  'svg',
  'svg.import',
  './svgView',
  'text!../../svg/Map.svg'
], function(
  SVG,
  svgImport,
  SVGView,
  map
) {

  var gameView = SVGView.extend({
    id: 'gameView',

    initialize: function() {
      this.showMap();
    },

    showMap: function() {
      var draw = SVG('drawing');
        draw.svg(map)

        var group = SVG.get('Group');
        group.each(function() {
            this.fill('#FF0000').stroke({color: '#000', width: 5})
        });
    },


  })

  return gameView;
});
{'fraction_non_alphanumeric': 0.1962983735277622, 'fraction_numerical': 0.014582164890633763, 'mean_word_length': 2.191413237924866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '2616157', 'n_tokens_mistral': 625, 'n_tokens_neox': 595, 'n_words': 107}