UNPKG

1.44 kBJavaScriptView Raw
1var __extends = (this && this.__extends) || (function () {
2 var extendStatics = Object.setPrototypeOf ||
3 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5 return function (d, b) {
6 extendStatics(d, b);
7 function __() { this.constructor = d; }
8 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9 };
10})();
11import { Injectable } from '@angular/core';
12import { HammerGestureConfig } from '@angular/platform-browser';
13/**
14 * @hidden
15 * This class overrides the default Angular gesture config.
16 */
17var IonicGestureConfig = (function (_super) {
18 __extends(IonicGestureConfig, _super);
19 function IonicGestureConfig() {
20 return _super !== null && _super.apply(this, arguments) || this;
21 }
22 IonicGestureConfig.prototype.buildHammer = function (element) {
23 var mc = new window.Hammer(element);
24 for (var eventName in this.overrides) {
25 mc.get(eventName).set(this.overrides[eventName]);
26 }
27 return mc;
28 };
29 IonicGestureConfig.decorators = [
30 { type: Injectable },
31 ];
32 /** @nocollapse */
33 IonicGestureConfig.ctorParameters = function () { return []; };
34 return IonicGestureConfig;
35}(HammerGestureConfig));
36export { IonicGestureConfig };
37//# sourceMappingURL=gesture-config.js.map
\No newline at end of file