Skip to main content
Notice removed Draw attention by CommunityBot
Bounty Ended with no winning answer by CommunityBot
added 728 characters in body
Source Link
Alberto Bricio
  • 422
  • 1
  • 7
  • 23

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both gestures separately.

I have built hammer configuration in my module, as below:

import * as Hammer from 'hammerjs';
import { HammerGestureConfig } from '@angular/platform-browser';

export class HammerConfig extends HammerGestureConfig{

    buildHammer(element: HTMLElement)
    {
        const hammerManager = new Hammer(element);
        let rotate = new Hammer.Rotate({enable: true});
        let pinch = new Hammer.Pinch({enable: true});
        let pan = new Hammer.Pan();

        pan.requireFailure([rotate, pinch]);
        pinch.recognizeWith(rotate);
        hammerManager.add([rotate, pan, pinch]);

        return hammerManager;
    }
}

I am trying with:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

This changes doesn't work. Only rotate gestures are launched...

If I add:

pinch.recognizeWith(rotate);

It launches both events...

Are there any way to launch them separately? I will appreciate any kind of help

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both gestures separately.

I am trying with:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

This changes doesn't work. Only rotate gestures are launched...

If I add:

pinch.recognizeWith(rotate);

It launches both events...

Are there any way to launch them separately? I will appreciate any kind of help

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both gestures separately.

I have built hammer configuration in my module, as below:

import * as Hammer from 'hammerjs';
import { HammerGestureConfig } from '@angular/platform-browser';

export class HammerConfig extends HammerGestureConfig{

    buildHammer(element: HTMLElement)
    {
        const hammerManager = new Hammer(element);
        let rotate = new Hammer.Rotate({enable: true});
        let pinch = new Hammer.Pinch({enable: true});
        let pan = new Hammer.Pan();

        pan.requireFailure([rotate, pinch]);
        pinch.recognizeWith(rotate);
        hammerManager.add([rotate, pan, pinch]);

        return hammerManager;
    }
}

I am trying with:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

This changes doesn't work. Only rotate gestures are launched...

If I add:

pinch.recognizeWith(rotate);

It launches both events...

Are there any way to launch them separately? I will appreciate any kind of help

Notice added Draw attention by Alberto Bricio
Bounty Started worth 50 reputation by Alberto Bricio
added 24 characters in body; edited title
Source Link
Alberto Bricio
  • 422
  • 1
  • 7
  • 23

Angular HammerJS/HammerJS - Avoid rotate gesturegestures on pinch in/out event

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both eventsgestures separately.

I have useam trying with:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

And itThis changes doesn't workswork. Only launch rotate gestures are launched...

If I add:

pinch.recognizeWith(rotate);

It launchlaunches both events...

Are there any way to launch itthem separately? I will appreciate any kind of help

Angular HammerJS - Avoid rotate gesture on pinch in/out event

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both events separately.

I have use:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

And it doesn't works. Only launch rotate gestures...

If I add:

pinch.recognizeWith(rotate);

It launch both events...

Are there any way to launch it separately? I will appreciate any kind of help

Angular/HammerJS - Avoid rotate gestures on pinch in/out

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both gestures separately.

I am trying with:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

This changes doesn't work. Only rotate gestures are launched...

If I add:

pinch.recognizeWith(rotate);

It launches both events...

Are there any way to launch them separately? I will appreciate any kind of help

Source Link
Alberto Bricio
  • 422
  • 1
  • 7
  • 23

Angular HammerJS - Avoid rotate gesture on pinch in/out event

I'm trying to launch pinch gestures without launch rotate gestures also. My purpose is launch both events separately.

I have use:

pinch.dropRecognizeWith(rotate);

and

rotate.dropRecognizeWith(pinch);

And it doesn't works. Only launch rotate gestures...

If I add:

pinch.recognizeWith(rotate);

It launch both events...

Are there any way to launch it separately? I will appreciate any kind of help