Switch branches/tags
@odopod/odo-window-events@1.2.0 @odopod/odo-window-events@1.1.0 @odopod/odo-window-events@1.0.3 @odopod/odo-window-events@1.0.2 @odopod/odo-window-events@1.0.1 @odopod/odo-viewport@1.1.1 @odopod/odo-viewport@1.1.0 @odopod/odo-viewport@1.0.3 @odopod/odo-viewport@1.0.2 @odopod/odo-viewport@1.0.1 @odopod/odo-video@1.2.2 @odopod/odo-video@1.2.1 @odopod/odo-video@1.2.0 @odopod/odo-video@1.1.1 @odopod/odo-video@1.1.0 @odopod/odo-video@1.0.1 @odopod/odo-tap@1.1.2 @odopod/odo-tap@1.1.1 @odopod/odo-tap@1.1.0 @odopod/odo-tap@1.0.3 @odopod/odo-tap@1.0.2 @odopod/odo-tap@1.0.1 @odopod/odo-tabs@2.0.2 @odopod/odo-tabs@2.0.1 @odopod/odo-tabs@2.0.0 @odopod/odo-tabs@1.0.3 @odopod/odo-tabs@1.0.2 @odopod/odo-tabs@1.0.1 @odopod/odo-sticky-headers@1.2.0 @odopod/odo-sticky-headers@1.1.0 @odopod/odo-sticky-headers@1.0.3 @odopod/odo-sticky-headers@1.0.2 @odopod/odo-sticky-headers@1.0.1 @odopod/odo-share@1.1.1 @odopod/odo-share@1.1.0 @odopod/odo-share@1.0.3 @odopod/odo-share@1.0.2 @odopod/odo-share@1.0.1 @odopod/odo-scroll-feedback@1.2.0 @odopod/odo-scroll-feedback@1.1.0 @odopod/odo-scroll-feedback@1.0.3 @odopod/odo-scroll-feedback@1.0.2 @odopod/odo-scroll-feedback@1.0.1 @odopod/odo-scroll-animation@1.2.0 @odopod/odo-scroll-animation@1.1.0 @odopod/odo-scroll-animation@1.0.2 @odopod/odo-scroll-animation@1.0.1 @odopod/odo-sassplate@2.0.1 @odopod/odo-sassplate@2.0.0 @odopod/odo-sassplate@1.1.1 @odopod/odo-reveal@2.0.2 @odopod/odo-reveal@2.0.1 @odopod/odo-reveal@2.0.0 @odopod/odo-reveal@1.0.3 @odopod/odo-reveal@1.0.2 @odopod/odo-reveal@1.0.1 @odopod/odo-responsive-images@1.2.0 @odopod/odo-responsive-images@1.1.0 @odopod/odo-responsive-images@1.0.3 @odopod/odo-responsive-images@1.0.2 @odopod/odo-responsive-images@1.0.1 @odopod/odo-responsive-classes@1.1.1 @odopod/odo-responsive-classes@1.1.0 @odopod/odo-responsive-classes@1.0.3 @odopod/odo-responsive-classes@1.0.2 @odopod/odo-responsive-classes@1.0.1 @odopod/odo-responsive-attributes@1.1.1 @odopod/odo-responsive-attributes@1.1.0 @odopod/odo-responsive-attributes@1.0.3 @odopod/odo-responsive-attributes@1.0.2 @odopod/odo-responsive-attributes@1.0.1 @odopod/odo-pointer@1.2.1 @odopod/odo-pointer@1.2.0 @odopod/odo-pointer@1.1.0 @odopod/odo-pointer@1.0.3 @odopod/odo-pointer@1.0.2 @odopod/odo-pointer@1.0.1 @odopod/odo-on-swipe@1.1.2 @odopod/odo-on-swipe@1.1.1 @odopod/odo-on-swipe@1.1.0 @odopod/odo-on-swipe@1.0.3 @odopod/odo-on-swipe@1.0.2 @odopod/odo-on-swipe@1.0.1 @odopod/odo-object-fit@1.1.1 @odopod/odo-object-fit@1.1.0 @odopod/odo-object-fit@1.0.3 @odopod/odo-object-fit@1.0.2 @odopod/odo-object-fit@1.0.1 @odopod/odo-module@1.2.1 @odopod/odo-module@1.2.0 @odopod/odo-module@1.1.0 @odopod/odo-module@1.0.1 @odopod/odo-hotspots@1.2.1 @odopod/odo-hotspots@1.2.0 @odopod/odo-hotspots@1.1.3 @odopod/odo-hotspots@1.1.2 @odopod/odo-hotspots@1.1.1 @odopod/odo-hotspots@1.1.0 @odopod/odo-hotspots@1.0.2 @odopod/odo-hotspots@1.0.1
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
demos
dist
src
test
README.md
coverage.json
index.d.ts
package.json
yarn.lock

README.md

Odo Scroll Feedback

Based user input from mouse, keyboard, and touch, the ScrollFeedback instance will emit navigation events with a direction property signifying which way the user should be taken

Install

npm install @odopod/odo-scroll-feedback --save

Quick Start

import OdoScrollFeedback from '@odopod/odo-scroll-feedback';

var scrollFeedback = new OdoScrollFeedback(document.body);

scrollFeedback.on(OdoScrollFeedback.Events.NAVIGATE, function(data) {
  switch (data.direction) {
    case OdoScrollFeedback.Direction.NEXT:
      console.log('go to the next state');
      break;
    case OdoScrollFeedback.Direction.PREVIOUS:
      console.log('go to the previous state');
      break;
    case OdoScrollFeedback.Direction.START:
      console.log('home key pressed');
      break;
    case OdoScrollFeedback.Direction.END:
      console.log('end key pressed');
      break;
  }
}, false);

Documentation

Visit the Odo component directory for demos, code examples, and documentation.