A Flight component for device orientation.
bower install --save flight-orientationdefine(['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 of this component needs Bower, and ideally Karma to be globally installed:
npm install -g bower karmaThen install the Node.js and client-side dependencies by running the following commands in the repo's root directory.
npm install
bower installTo continuously run the tests in Chrome and Firefox during development, just run:
karma startAnyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.