overscroll
Version:
33 lines (24 loc) • 642 B
JavaScript
import animScroll from './animScroll';
import animSection from './animSection';
export default (function (scope) {
var animation = void 0;
var mode = scope.mode,
overscroll = scope.overscroll,
handleBeforeScroll = scope.handleBeforeScroll,
handleAfterScroll = scope.handleAfterScroll;
handleBeforeScroll(function () {
overscroll.scrolling = true;
});
handleAfterScroll(function () {
overscroll.scrolling = false;
});
if (mode === 'scroll') {
animation = animScroll(scope);
}
if (mode === 'section') {
animation = animSection(scope);
}
return {
animation: animation
};
});