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