Skip to content

Commit

Permalink
Added two new events yielded by StickyElements.ContextMixin: "scrolli…
Browse files Browse the repository at this point in the history
…n" and "scrollout". These are fired continuously when an element is halfway visible, in the process of being scrolled in or out of the specified context element.
  • Loading branch information
klale committed Jan 26, 2016
1 parent 115ef5c commit 49f1a47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tiki/js/sticky-elements/ContextMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var ContextMixin = {
if (marginTop === rowHeight) {
this.rowStatus = 'above';
}
this.trigger('scrollout', {length: marginTop});
},
onScrollIn: function(scrollData) {
var distance = this.getDistanceToStack(scrollData);
Expand All @@ -57,6 +58,7 @@ var ContextMixin = {
this.rowStatus = null;
this.frozenStackHeight = null;
}
this.trigger('scrollin', {length: marginTop});
},

onVerticalScroll: function(scrollData) {
Expand Down

0 comments on commit 49f1a47

Please sign in to comment.