Permalink
Browse files

feat(platform-browser): fix #19604, can config hammerOptions (#21979)

PR Close #21979
  • Loading branch information...
JiaLiPassion authored and matsko committed Feb 2, 2018
1 parent 3a0b5a9 commit 1d571b299da3777994ee9303f6e56e5d3679146f
@@ -72,8 +72,17 @@ export class HammerGestureConfig {
overrides: {[key: string]: Object} = {};
options?: {
cssProps?: any; domEvents?: boolean; enable?: boolean | ((manager: any) => boolean);
preset?: any[];
touchAction?: string;
recognizers?: any[];
inputClass?: any;
inputTarget?: EventTarget;
};
buildHammer(element: HTMLElement): HammerInstance {
const mc = new Hammer(element);
const mc = new Hammer(element, this.options);
mc.get('pinch').set({enable: true});
mc.get('rotate').set({enable: true});
@@ -53,6 +53,16 @@ export declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
/** @experimental */
export declare class HammerGestureConfig {
events: string[];
options?: {
cssProps?: any;
domEvents?: boolean;
enable?: boolean | ((manager: any) => boolean);
preset?: any[];
touchAction?: string;
recognizers?: any[];
inputClass?: any;
inputTarget?: EventTarget;
};
overrides: {
[key: string]: Object;
};

0 comments on commit 1d571b2

Please sign in to comment.