]> git.proxmox.com Git - sencha-touch.git/blob - src/src/device/orientation/Abstract.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / device / orientation / Abstract.js
1 /**
2 * @private
3 */
4 Ext.define('Ext.device.orientation.Abstract', {
5 mixins: ['Ext.mixin.Observable'],
6
7 /**
8 * @event orientationchange
9 * Fires when the orientation has been changed on this device.
10 *
11 * Ext.device.Orientation.on({
12 * scope: this,
13 * orientationchange: function(e) {
14 * console.log('Alpha: ', e.alpha);
15 * console.log('Beta: ', e.beta);
16 * console.log('Gamma: ', e.gamma);
17 * }
18 * });
19 *
20 * @param {Object} event The event object
21 * @param {Object} event.alpha The alpha value of the orientation event
22 * @param {Object} event.beta The beta value of the orientation event
23 * @param {Object} event.gamma The gamma value of the orientation event
24 */
25
26 onDeviceOrientation: function(e) {
27 this.doFireEvent('orientationchange', [e]);
28 }
29 });