FIX: eyeline was broken in dev
This commit is contained in:
parent
930d06673e
commit
a8d20c623f
|
@ -4,7 +4,7 @@ const Eyeline = function Eyeline(selector) {
|
|||
};
|
||||
|
||||
Eyeline.prototype.update = function() {
|
||||
if (Ember.Test) { return; }
|
||||
if (Ember.testing) { return; }
|
||||
|
||||
const docViewTop = $(window).scrollTop(),
|
||||
windowHeight = $(window).height(),
|
||||
|
@ -60,7 +60,7 @@ Eyeline.prototype.update = function() {
|
|||
|
||||
// Call this when we know aren't loading any more elements. Mark the rest as seen
|
||||
Eyeline.prototype.flushRest = function() {
|
||||
if (Ember.Test) { return; }
|
||||
if (Ember.testing) { return; }
|
||||
const self = this;
|
||||
$(this.selector).each(function(i, elem) {
|
||||
return self.trigger('saw', { detail: $(elem) });
|
||||
|
|
|
@ -4,7 +4,7 @@ import Scrolling from 'discourse/mixins/scrolling';
|
|||
// Provides the ability to load more items for a view which is scrolled to the bottom.
|
||||
export default Ember.Mixin.create(Ember.ViewTargetActionSupport, Scrolling, {
|
||||
|
||||
scrolled: function() {
|
||||
scrolled() {
|
||||
const eyeline = this.get('eyeline');
|
||||
if (eyeline) { eyeline.update(); }
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue