Skip to content

Commit c269c18

Browse files
committed
fix(gestures): remove drag event from config
Removes the `drag` event from the gesture config. Fixes #1025.
1 parent a0d85d8 commit c269c18

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib/core/gestures/MdGestureConfig.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export class MdGestureConfig extends HammerGestureConfig {
77

88
/* List of new event names to add to the gesture support list */
99
events: string[] = [
10-
'drag',
1110
'dragright',
1211
'dragleft',
1312
'longpress',
@@ -41,14 +40,13 @@ export class MdGestureConfig extends HammerGestureConfig {
4140
// Notice that a HammerJS recognizer can only depend on one other recognizer once.
4241
// Otherwise the previous `recognizeWith` will be dropped.
4342
let slide = this._createRecognizer(pan, {event: 'slide', threshold: 0}, swipe);
44-
let drag = this._createRecognizer(slide, {event: 'drag', threshold: 6}, swipe);
4543
let longpress = this._createRecognizer(press, {event: 'longpress', time: 500});
4644

4745
// Overwrite the default `pan` event to use the swipe event.
4846
pan.recognizeWith(swipe);
4947

5048
// Add customized gestures to Hammer manager
51-
mc.add([swipe, press, pan, drag, slide, longpress]);
49+
mc.add([swipe, press, pan, slide, longpress]);
5250

5351
return mc;
5452
}
@@ -58,7 +56,7 @@ export class MdGestureConfig extends HammerGestureConfig {
5856
let recognizer = new (<RecognizerStatic> base.constructor)(options);
5957

6058
inheritances.push(base);
61-
inheritances.forEach((item) => recognizer.recognizeWith(item));
59+
inheritances.forEach(item => recognizer.recognizeWith(item));
6260

6361
return recognizer;
6462
}

0 commit comments

Comments
 (0)