<commit_before>define(['underscore', 'backbone.marionette', './LessonView'],
  function(_, Marionette, LessonView) {
  'use strict';

  return Marionette.CollectionView.extend({
    el: $('#timetable'),
    childView: LessonView,
    childViewOptions: function () {
      return {
        parentView: this,
        timetable: this.collection
      };
    },

    events: {
      'mousemove': 'mouseMove',
      'mouseleave': 'mouseLeave'
    },

    initialize: function() {
      this.$colgroups = this.$('colgroup');
    },

    mouseMove: function(evt) {
      if (!this.colX) {
        this.colX = this.$('#mon > tr:last-child > td')
          .filter(':even')
          .map(function() { return $(this).offset().left; })
          .get();
      }

      var currCol = this.$colgroups.eq(_.sortedIndex(this.colX, evt.pageX));
      if (!currCol.is(this.prevCol)) {
        if (this.prevCol) {
          this.prevCol.removeAttr('class');
        }
        currCol.addClass('hover');
        this.prevCol = currCol;
      }
    },

    mouseLeave: function() {<commit_msg>Store colgroup in ui hash<commit_after>define(['underscore', 'backbone.marionette', './LessonView'],
  function(_, Marionette, LessonView) {
  'use strict';

  return Marionette.CollectionView.extend({
    el: $('#timetable'),
    childView: LessonView,
    childViewOptions: function () {
      return {
        parentView: this,
        timetable: this.collection
      };
    },

    events: {
      'mousemove': 'mouseMove',
      'mouseleave': 'mouseLeave'
    },

    ui: {
      colgroups: 'colgroup'
    },

    initialize: function() {
    },

    mouseMove: function(evt) {
      if (!this.colX) {
        this.colX = this.$('#mon > tr:last-child > td')
          .filter(':even')
          .map(function() { return $(this).offset().left; })
          .get();
      }

      var currCol = this.ui.colgroups.eq(_.sortedIndex(this.colX, evt.pageX));
      if (!currCol.is(this.prevCol)) {
        if (this.prevCol) {
          this.prevCol.removeAttr('class');
        }
        currCol.addClass('hover');
        this.prevCol = currCol;
      }
    },

    mouseLeave: function() {
{'fraction_non_alphanumeric': 0.16589648798521256, 'fraction_numerical': 0.0, 'mean_word_length': 2.2654600301659125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2269748', 'n_tokens_mistral': 699, 'n_tokens_neox': 683, 'n_words': 119}