]> git.proxmox.com Git - extjs.git/blob - extjs/build/examples/kitchensink/modern/src/view/TouchEvents.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / kitchensink / modern / src / view / TouchEvents.js
1 /**
2 * Presents a large touch zone and reports all of the touch events fired when the user interacts with it
3 */
4 Ext.define('KitchenSink.view.TouchEvents', {
5 extend: 'Ext.Container',
6 xtype: 'touchevents',
7
8 requires: [
9 'KitchenSink.view.touchevent.Info',
10 'KitchenSink.view.touchevent.Logger',
11 'KitchenSink.view.touchevent.Pad'
12 ],
13
14 initialize: function() {
15 this.callParent(arguments);
16
17 var padElement = Ext.get('touchpad'),
18 fn = 'onTouchPadEvent';
19
20 padElement.on({
21 scope: this,
22 touchstart: fn,
23 touchend: fn,
24 touchmove: fn,
25 swipe: fn,
26 dragstart: fn,
27 drag: fn,
28 dragend: fn,
29 tap: fn,
30 singletap: fn,
31 doubletap: fn,
32 longpress: fn,
33 pinch: fn,
34 rotate: fn
35 });
36 },
37
38 onTouchPadEvent: function(e, target, options) {
39 this.down('toucheventlogger').addLog(e.type);
40 }
41 });