From c8211520f25f3526d8c1cd57c286771742b120f7 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 2 Feb 2015 10:31:15 +0100 Subject: [PATCH] Use Ember.run.throttle instead of $.throttle --- assets/scripts/app/utils/tailing.coffee | 2 +- assets/scripts/app/utils/to-top.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/scripts/app/utils/tailing.coffee b/assets/scripts/app/utils/tailing.coffee index 6162b169..31b88285 100644 --- a/assets/scripts/app/utils/tailing.coffee +++ b/assets/scripts/app/utils/tailing.coffee @@ -9,7 +9,7 @@ class Tailing constructor: (@window, @tail_selector, @log_selector) -> @position = @window.scrollTop() - @window.scroll( $.throttle( 200, @onScroll.bind(this) ) ) + @window.scroll( Ember.run.throttle(this, @onScroll, [], 200, false) ) this run: -> diff --git a/assets/scripts/app/utils/to-top.coffee b/assets/scripts/app/utils/to-top.coffee index 57f9fdf1..ae6b17e3 100644 --- a/assets/scripts/app/utils/to-top.coffee +++ b/assets/scripts/app/utils/to-top.coffee @@ -6,7 +6,7 @@ class ToTop # the calculations. constructor: (@window, @element_selector, @container_selector) -> @position = @window.scrollTop() - @window.scroll( $.throttle( 200, @onScroll.bind(this) ) ) + @window.scroll( Ember.run.throttle(this, @onScroll, [], 200, false) ) this element: ->