<commit_before>// Calls this.scroll on scroll events
// --------------------------------------
// Remember to call this._super() if you override didInsertElement or willDestroyElement.
//
App.RespondsToScroll = Ember.Mixin.create({

  didInsertElement: function () {
    this._super.apply(this, arguments);
    Ember.assert('RespondsToScroll must be mixed in to a View/Component', this instanceof Ember.View || this instanceof Ember.Component);
    this.scrollHandler = this.debouncedScroll.bind(this);
    $(window).on('scroll', this.scrollHandler);
  },

  willDestroyElement: function () {
    this._super.apply(this, arguments);
    $(window).off('scroll', this.scrollHandler);
  },

  debouncedScroll: function () {
    var self = this;
    window.requestAnimationFrame(function () {
      self.trigger('scroll');
    });
  },

  scroll: function (e) {
    console.warn('[RespondsToScroll] Please define a scroll function in the view using this mixin.');
  }
});<commit_msg>Match blades and checkout.blades mastheads for seamless transition<commit_after>// Calls this.scroll on scroll events
// --------------------------------------
// Remember to call this._super() if you override didInsertElement or willDestroyElement.
//
App.RespondsToScroll = Ember.Mixin.create({

  didInsertElement: function () {
    this._super.apply(this, arguments);
    Ember.assert('RespondsToScroll must be mixed in to a View/Component', this instanceof Ember.View || this instanceof Ember.Component);
    this.scrollHandler = this.debouncedScroll.bind(this);
    $(window).on('scroll', this.scrollHandler);
  },

  willDestroyElement: function () {
    this._super.apply(this, arguments);
    $(window).off('scroll', this.scrollHandler);
  },

  debouncedScroll: function () {
    var self = this;
    window.requestAnimationFrame(function () {
      self.trigger('scroll');
    });
  }
});
{'fraction_non_alphanumeric': 0.16719914802981894, 'fraction_numerical': 0.0, 'mean_word_length': 3.3195402298850576, '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': '2186871', 'n_tokens_mistral': 524, 'n_tokens_neox': 507, 'n_words': 128}