flight-orientation

A flight component for device orientation


License
MIT
Install
bower install flight-orientation

Documentation

No Maintenance Intended Build Status

flight-orientation

A Flight component for device orientation.

Installation

bower install --save flight-orientation

Example

define(['flight-orientation'], function(Orientation) {

  Orientation.attachTo(document);

  // Listen for device orientation updates
  $(document).on('orientation-update', function(e, orientation) {
    console.log(e, orientation);
  });

  // Listen for device support
  $(document).on('orientation-supported', function() {
    console.log('Device supports orientation!');
  });

  // Listen for unsupported devices
  $(document).on('orientation-unsupported', function() {
    console.log('Device doesn't support orientation :(');
  });
});

Development

Development of this component needs Bower, and ideally Karma to be globally installed:

npm install -g bower karma

Then install the Node.js and client-side dependencies by running the following commands in the repo's root directory.

npm install
bower install

To continuously run the tests in Chrome and Firefox during development, just run:

karma start

Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.