From 0983920403ab822e608aa556c8eb0ab721ace061 Mon Sep 17 00:00:00 2001 From: Athou Date: Mon, 6 May 2013 12:09:47 +0200 Subject: [PATCH] make sure it's the right direction that is firing the event (#62) --- src/main/webapp/js/directives.js | 4 ++-- src/main/webapp/templates/feeds.view.html | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js index 842816a3..22556fe8 100644 --- a/src/main/webapp/js/directives.js +++ b/src/main/webapp/js/directives.js @@ -99,11 +99,11 @@ module.directive('onScrollMiddle', function () { w.data.scrollInit = true; } scope.$watch(down, function(value, oldValue) { - if(w.data.scrollDirection == 'down' && value && oldValue && value != oldValue) + if(w.data.scrollDirection == 'down' && value && oldValue && value != oldValue && value == 'above') scope.$eval(attrs.onScrollMiddle); }); scope.$watch(up, function(value, oldValue) { - if(w.data.scrollDirection == 'up' && value && oldValue && value != oldValue) + if(w.data.scrollDirection == 'up' && value && oldValue && value != oldValue && value == 'below') scope.$eval(attrs.onScrollMiddle); }); } diff --git a/src/main/webapp/templates/feeds.view.html b/src/main/webapp/templates/feeds.view.html index 525e7488..d98d0725 100644 --- a/src/main/webapp/templates/feeds.view.html +++ b/src/main/webapp/templates/feeds.view.html @@ -6,7 +6,8 @@
Error while loading this feed : {{message}}
-
+