<commit_before>

var $ = require('jquery');
var _ = require('lodash');


/**
 * A sliding region on the heatmap that represents the region of the source
 * document that's currently visible on the screen.
 *
 * @param {Heatmap} heatmap: A Heatmap instance.
 */

var Window = function(heatmap) {

  this.heatmap = heatmap;

  // Top occluder:
  this.top = this.heatmap.svg.append('rect')
    .classed('occluder', true);

  // Bottom occluder:
  this.bottom = this.heatmap.svg.append('rect')
    .classed('occluder', true);

  // Position on scroll.
  $(window).scroll(_.bind(this._position, this));

};<commit_msg>In Window, always call _position() on startup.<commit_after>

var $ = require('jquery');
var _ = require('lodash');


/**
 * A sliding region on the heatmap that represents the region of the source
 * document that's currently visible on the screen.
 *
 * @param {Heatmap} heatmap: A Heatmap instance.
 */

var Window = function(heatmap) {

  this.heatmap = heatmap;

  // Top occluder:
  this.top = this.heatmap.svg.append('rect')
    .classed('occluder', true);

  // Bottom occluder:
  this.bottom = this.heatmap.svg.append('rect')
    .classed('occluder', true);

  // Position on scroll.
  $(window).scroll(_.bind(this._position, this));
  this._position();

};
{'fraction_non_alphanumeric': 0.1532447224394058, 'fraction_numerical': 0.0, 'mean_word_length': 3.63768115942029, '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': '709587', 'n_tokens_mistral': 444, 'n_tokens_neox': 409, 'n_words': 113}