PR Close #21979
This commit is contained in:
parent
3a0b5a928c
commit
1d571b299d
|
@ -72,8 +72,17 @@ export class HammerGestureConfig {
|
||||||
|
|
||||||
overrides: {[key: string]: Object} = {};
|
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 {
|
buildHammer(element: HTMLElement): HammerInstance {
|
||||||
const mc = new Hammer(element);
|
const mc = new Hammer(element, this.options);
|
||||||
|
|
||||||
mc.get('pinch').set({enable: true});
|
mc.get('pinch').set({enable: true});
|
||||||
mc.get('rotate').set({enable: true});
|
mc.get('rotate').set({enable: true});
|
||||||
|
|
|
@ -53,6 +53,16 @@ export declare const HAMMER_GESTURE_CONFIG: InjectionToken<HammerGestureConfig>;
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare class HammerGestureConfig {
|
export declare class HammerGestureConfig {
|
||||||
events: string[];
|
events: string[];
|
||||||
|
options?: {
|
||||||
|
cssProps?: any;
|
||||||
|
domEvents?: boolean;
|
||||||
|
enable?: boolean | ((manager: any) => boolean);
|
||||||
|
preset?: any[];
|
||||||
|
touchAction?: string;
|
||||||
|
recognizers?: any[];
|
||||||
|
inputClass?: any;
|
||||||
|
inputTarget?: EventTarget;
|
||||||
|
};
|
||||||
overrides: {
|
overrides: {
|
||||||
[key: string]: Object;
|
[key: string]: Object;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue