Questions tagged [hammer.js]
Hammer is an open-source library that can recognize gestures made by touch, mouse and pointerEvents. It has support for multiple instances the same time, so you can start creating multi-user touch interfaces.
hammer.js
750
questions
1
vote
1
answer
910
views
Angular 7: How to resolve Hammer.js dependency in Jasmine unit test
When writing unit tests for a component that uses a Material Slider and depends on HammerJS for it, I'm seeing this error WARN LOG: 'The "slide" event cannot be bound because Hammer.JS is ...
1
vote
0
answers
141
views
Event after swipe fires multiple times hammer.js
I use hammer.js to create a T*nder-Style swiping. After swipe right for love or left for nope, I want to start some scripts. In my approach It actually fires multiple times after swipe to right or ...
5
votes
4
answers
15k
views
Hammer.js : How to handle / set tap and doubletap on same elements
I'm using jquery.hammer.js, it works quite well and I am able to bind function to a doubletap event. That is working fine.
What I want is to bind two different behaviors. One for the "tap", one for ...
3
votes
2
answers
2k
views
Handling Velocity/Inertia on Dragging
I've built a vertical sliderish thing in my web application with the support of mouse and touch dragging events by Hammer.js. At the end of the drag (when user releases mouse button or takes his ...
0
votes
1
answer
346
views
How to initialize a hammerJS object with options as parameters
So we can create a Hammer object and set change its options like this:
let mc = new Hammer(element);
mc.get('pan').set({ direction: Hammer.DIRECTION_NONE });
How can we set the options with the ...
62
votes
5
answers
56k
views
Could not find HammerJS in angular 6
I use angular-material in my project. I am getting this warnings:
Could not find HammerJS. Certain Angular Material components may
not work correctly.
The "longpress" event cannot be bound
...
0
votes
1
answer
558
views
Hammerjs is not detecting swipe movement
I'm using Hammerjs 2.0.8 with Nuxt, and I can't seem to make it detect swipe motion. Here's how I've done the setup. If I change the recognizer to [Hammer.Pan, { direction: Hammer.DIRECTION_HORIZONTAL ...
4
votes
1
answer
1k
views
The "swiperight" event cannot be bound because Hammer.JS is not loaded
What is the proper configuration for HammerJS in Angular 10/11?
We shouldn't import from 'hammerjs' anymore, instead, we should import HammerModule from @angular/platform-browser. This doesn't seem to ...
1
vote
1
answer
4k
views
Why is pan (and zoom) not working on my Chart.js graph?
I'm making a linear graph and the pan and zoom functionality are not working.
I'm using:
"chart.js": "Chart-js#v2.5.0",
"chartjs-plugin-zoom": "Chart.Zoom.js#v0.7.0",
"hammerjs": "v2.0.8"
and added ...
2
votes
1
answer
827
views
Swipe and click on links with Hammer js
I have Angular 12 application.
There is carousel with images, which are links.
I integrated Hammer JS as expected:
import * as Hammer from 'hammerjs';
export class HammerConfig extends ...
1
vote
1
answer
564
views
How do we configure hammerjs pinch in/out speed?
I am using hammerjs pinch in/out on my SVG element. Currently on single pinch out it is zooming out the maximum but I would like to configure the speed so that I can restrict the zoom based on my step ...
7
votes
3
answers
8k
views
Angular 9 never calls HammerGestureConfig.buildHammer
After update to Angular 9 it does not work to use Hammer.js anymore. We have extended the Angular HammerGestureConfig like the following.:
import {HammerGestureConfig} from '@angular/platform-browser'...
1
vote
2
answers
293
views
Y-pan event delay with hammer.js
The following script is a basic navigation that enforces perpendicular motion (left-right-up-down) in a Phaser-based app. My problem is a significant delay in y-direction pan events triggering, which ...
1
vote
2
answers
3k
views
How to use Angular Material without HammerJS
What is the proper way to use Angular Material without Hammerjs?
I don't wan't HammerJS. It is creating weird behavior (switch to another tab) when I drag my mouse inside a Material Tab Group (even ...
6
votes
1
answer
2k
views
Prevent pinch/zoom in Safari for OSX
I have a html5 application with several viewports. I intend to use HammerJS for providing pinch/zoom gesture on individual viewports. Currently, whenever I pinch in Safari/OSX, the whole window is ...