forked from Archives/Athou_commafeed
make sure it's the right direction that is firing the event (#62)
This commit is contained in:
@@ -99,11 +99,11 @@ module.directive('onScrollMiddle', function () {
|
|||||||
w.data.scrollInit = true;
|
w.data.scrollInit = true;
|
||||||
}
|
}
|
||||||
scope.$watch(down, function(value, oldValue) {
|
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.$eval(attrs.onScrollMiddle);
|
||||||
});
|
});
|
||||||
scope.$watch(up, function(value, oldValue) {
|
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);
|
scope.$eval(attrs.onScrollMiddle);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
<div infinite-scroll="loadMoreEntries()" infinite-scroll-disabled="busy || !settingsService.settings.readingMode" infinite-scroll-distance="1" id="feed-accordion"
|
<div infinite-scroll="loadMoreEntries()" infinite-scroll-disabled="busy || !settingsService.settings.readingMode" infinite-scroll-distance="1" id="feed-accordion"
|
||||||
ng-class="{'expanded' : settingsService.settings.viewMode == 'expanded' }">
|
ng-class="{'expanded' : settingsService.settings.viewMode == 'expanded' }">
|
||||||
<div ng-show="message && errorCount > 10">Error while loading this feed : {{message}}</div>
|
<div ng-show="message && errorCount > 10">Error while loading this feed : {{message}}</div>
|
||||||
<div ng-repeat="entry in entries" class="entry" scroll-to="isOpen && current == entry" scroll-to-offset="-58" on-scroll-middle="onScroll(entry)" ng-class="{current: current==entry}">
|
<div ng-repeat="entry in entries" class="entry" scroll-to="isOpen && current == entry" scroll-to-offset="-58" on-scroll-middle="onScroll(entry)"
|
||||||
|
ng-class="{current: current==entry}">
|
||||||
<a href="{{entry.url}}" target="_blank" class="entry-heading" ng-click="noop($event)" ng-mouseup="entryClicked(entry, $event)"
|
<a href="{{entry.url}}" target="_blank" class="entry-heading" ng-click="noop($event)" ng-mouseup="entryClicked(entry, $event)"
|
||||||
ng-class="{open: current == entry, closed: current != entry}">
|
ng-class="{open: current == entry, closed: current != entry}">
|
||||||
<span class="feed-name">
|
<span class="feed-name">
|
||||||
|
|||||||
Reference in New Issue
Block a user