extjs-gpl
Version:
GPL licensed version of Sencha Ext JS
30 lines (27 loc) • 911 B
JavaScript
/**
* @private
*/
Ext.define('Ext.device.orientation.Abstract', {
mixins: ['Ext.mixin.Observable'],
/**
* @event orientationchange
* Fires when the orientation has been changed on this device.
*
* Ext.device.Orientation.on({
* scope: this,
* orientationchange: function(e) {
* console.log('Alpha: ', e.alpha);
* console.log('Beta: ', e.beta);
* console.log('Gamma: ', e.gamma);
* }
* });
*
* @param {Object} event The event object
* @param {Object} event.alpha The alpha value of the orientation event
* @param {Object} event.beta The beta value of the orientation event
* @param {Object} event.gamma The gamma value of the orientation event
*/
onDeviceOrientation: function(e) {
this.doFireEvent('orientationchange', [e]);
}
});