Skip to content

Instantly share code, notes, and snippets.

@poteto
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poteto/95a27c31896b19505b73 to your computer and use it in GitHub Desktop.
Save poteto/95a27c31896b19505b73 to your computer and use it in GitHub Desktop.
_scrollHandler: function() {
return Ember.run.debounce(this, '_updateBoundingClientRect', this.get('scrollTimeout'));
},
_bindScroll: (function() {
var scrollHandler;
scrollHandler = this._scrollHandler.bind(this);
Ember.$(document).on('touchmove.scrollable', scrollHandler);
Ember.$(window).on('scroll.scrollable', scrollHandler);
}).on('didInsertElement'),
_unbindScroll: (function() {
Ember.$(window).off('.scrollable');
Ember.$(document).off('.scrollable');
}).on('willDestroyElement')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment