| 
									
										
										
										
											2015-11-17 15:24:36 -08:00
										 |  |  | import {EventManagerPlugin} from 'angular2/core'; | 
					
						
							| 
									
										
										
										
											2015-11-06 17:34:07 -08:00
										 |  |  | import {StringMapWrapper} from 'angular2/src/facade/collection'; | 
					
						
							| 
									
										
										
										
											2015-02-09 15:11:31 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | var _eventNames = { | 
					
						
							|  |  |  |   // pan
 | 
					
						
							|  |  |  |   'pan': true, | 
					
						
							|  |  |  |   'panstart': true, | 
					
						
							|  |  |  |   'panmove': true, | 
					
						
							|  |  |  |   'panend': true, | 
					
						
							|  |  |  |   'pancancel': true, | 
					
						
							|  |  |  |   'panleft': true, | 
					
						
							|  |  |  |   'panright': true, | 
					
						
							|  |  |  |   'panup': true, | 
					
						
							|  |  |  |   'pandown': true, | 
					
						
							|  |  |  |   // pinch
 | 
					
						
							|  |  |  |   'pinch': true, | 
					
						
							|  |  |  |   'pinchstart': true, | 
					
						
							|  |  |  |   'pinchmove': true, | 
					
						
							|  |  |  |   'pinchend': true, | 
					
						
							|  |  |  |   'pinchcancel': true, | 
					
						
							|  |  |  |   'pinchin': true, | 
					
						
							|  |  |  |   'pinchout': true, | 
					
						
							|  |  |  |   // press
 | 
					
						
							|  |  |  |   'press': true, | 
					
						
							|  |  |  |   'pressup': true, | 
					
						
							|  |  |  |   // rotate
 | 
					
						
							|  |  |  |   'rotate': true, | 
					
						
							|  |  |  |   'rotatestart': true, | 
					
						
							|  |  |  |   'rotatemove': true, | 
					
						
							|  |  |  |   'rotateend': true, | 
					
						
							|  |  |  |   'rotatecancel': true, | 
					
						
							|  |  |  |   // swipe
 | 
					
						
							|  |  |  |   'swipe': true, | 
					
						
							|  |  |  |   'swipeleft': true, | 
					
						
							|  |  |  |   'swiperight': true, | 
					
						
							|  |  |  |   'swipeup': true, | 
					
						
							|  |  |  |   'swipedown': true, | 
					
						
							|  |  |  |   // tap
 | 
					
						
							|  |  |  |   'tap': true, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export class HammerGesturesPluginCommon extends EventManagerPlugin { | 
					
						
							| 
									
										
										
										
											2015-05-18 11:57:20 -07:00
										 |  |  |   constructor() { super(); } | 
					
						
							| 
									
										
										
										
											2015-02-09 15:11:31 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |   supports(eventName: string): boolean { | 
					
						
							|  |  |  |     eventName = eventName.toLowerCase(); | 
					
						
							|  |  |  |     return StringMapWrapper.contains(_eventNames, eventName); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } |