summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/js/build/app.js b/js/build/app.js
index fe60c82a6..7554cfe3b 100644
--- a/js/build/app.js
+++ b/js/build/app.js
@@ -1815,6 +1815,7 @@ app.directive('newsScroll', ["$timeout", function ($timeout) {
return {
restrict: 'A',
scope: {
+ 'newsScroll': '@',
'newsScrollAutoPage': '&',
'newsScrollMarkRead': '&',
'newsScrollEnabledMarkRead': '=',
@@ -1825,6 +1826,11 @@ app.directive('newsScroll', ["$timeout", function ($timeout) {
},
link: function (scope, elem) {
var allowScroll = true;
+ var scrollArea = elem;
+
+ if (scope.newsScroll) {
+ scrollArea = $(scope.newsScroll);
+ }
var scrollTimeout = scope.newsScrollTimeout || 1;
var markReadTimeout = scope.newsScrollMarkReadTimeout || 1;
@@ -1851,14 +1857,13 @@ app.directive('newsScroll', ["$timeout", function ($timeout) {
scope);
}, markReadTimeout*1000);
}
-
};
- elem.on('scroll', scrollHandler);
+ scrollArea.on('scroll', scrollHandler);
// remove scroll handler if element is destroyed
scope.$on('$destroy', function () {
- elem.off('scroll', scrollHandler);
+ scrollArea.off('scroll', scrollHandler);
});
}
};