748
questions
0
votes
0
answers
61
views
Javascript touch event on mobile not working
When adding a touchstart and touchend event listener to my window or my document it just doesnt work when touching or swiping the screen on mobile
document.addEventListener('touchstart', (event) =>...
0
votes
0
answers
52
views
How to prevent hammer.js stop the page scrolling?
I'm using hammer integrated with svg-pan-zoom (https://github.com/bumbu/svg-pan-zoom?tab=readme-ov-file#custom-events-support).
I would like to let the page scroll panning in vertical direction even ...
3
votes
1
answer
888
views
How to enable Vertical Swipe with Hammer.js in Angular 17 (standalone component)
I tried to implement the vertical swipe with Hammer.js and Angular 17 but it's not working.
I'm trying to do a tinder-like app, so I want to be able to swipe right, swipe left and swipe up. I found ...
0
votes
0
answers
50
views
how to use some animation on leftswipe and rightswipe in angular13?
i want some animation on a material card on left swipe and right swipe, how to achieve?
I have tried hammer js, please provide me some documentation.
0
votes
0
answers
51
views
Angular - Sliding sidebar sometimes does not register the first click
I have implemented a sliding sidebar in my web-app for mobile users. The sliding listener is imported from hammerjs.
<app-nav-bar></app-nav-bar>
<div class="site-content">
&...
1
vote
1
answer
387
views
Using Hammer + chart + chart plugin zoom not work in mobile
I am encountering an issue with the drag functionality on mobile devices in a Chart.js chart that utilizes the chartjs-plugin-zoom and hammer.js. The chart works as expected on desktop browsers, but ...
2
votes
0
answers
113
views
Problem with jquery and hammer.js when using
I created a jquery function to be able to scroll a list of items back and forth, and it works perfectly with the mouse wheel.
Now I plan to use hammer.js to apply the same logic with touch, but I am ...
1
vote
0
answers
249
views
What can I do to fix the jerky movement of my swipe animation with Vue 3 and Hammer.js?
I have been trying to achieve this effect for days and I just don't understand what I might be doing wrong or what is coming into play when I do this type of animation. All I want is to detect a click ...
0
votes
0
answers
2k
views
Gesture Swipe in Angular 16 Application Using Hammer js not working
When i upgrade my app to Angular 16, hammerjs config not working with the config below
main.ts
@Injectable()
export class MyHammerConfig extends HammerGestureConfig {
overrides = <any>{
...
0
votes
0
answers
133
views
Browser picking wrong version of hammerjs
I have an angular application where inside package.json file I see hammerjs version as 2.0.8. Inside package-lock.json file also I see the same version info as 2.0.8 only. When I execute the command '...
0
votes
0
answers
85
views
Swipeable react component always starts from same [0.0] position
I'm trying to develop a swipe component using React w/ Redux and hammerjs. The problem is that each time I move my component the position.x and position.y start from [0,0] and not from the current ...
1
vote
0
answers
85
views
How to position image on canvas same as overlaped div of same dimension
I have two div of same dimension which overlap each other using z-index.
Ist div contain image and 2nd div contain a canvas
I am trying to draw image on canvas same place as Ist div. I am using ...
0
votes
1
answer
977
views
Instagram Story Progress Bar
I'm building something similar to the instagram story function with HTML, TailwindCSS and JavaScript. I have 6 different slides where I'm navigating with touch taps with hammerJS. At the top I have 6 ...
1
vote
0
answers
146
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 ...
0
votes
1
answer
578
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 ...
1
vote
1
answer
644
views
Can I use hammer.js in react?
Can i use hammer.js in react? this is javascript library. I searched react-hammerjs but it was deprecated. And i searched react-native-web and react-native-gesture-handler. react-native-web is use ...
2
votes
1
answer
838
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 ...
2
votes
1
answer
1k
views
How do I use hammerjs with Ionic
I am trying to using hammer js in ionic angular project.
I have imported hammermodule in my component's module:
import { BrowserModule, HammerModule } from '@angular/platform-browser';
//...
@NgModule(...
2
votes
1
answer
431
views
How do I properly implement debounce time here so that it fires only once per time limit in pure JavaScript?
Goal
I am trying to accomplish the following:
There is a slider/slidehow/carousel/whatever you want to call it, and I want it to register a touch event only once every 3s when you swipe to the right ...
0
votes
1
answer
190
views
Zoom and pan image with events from another image
I am doing an application in cordova where I have a image and then I put on top of it another image in PNG format with transparent background:
As you see the first picture is a photo and the second ...
0
votes
1
answer
310
views
hammer.js doesn't detect swipe
Hammer.js doesn't detect swipe when I use "touch-action: pan-x !important;" on that id, it works when I don't use touch action but then scroll is not working on my site.
I'm sorry if the ...
0
votes
0
answers
84
views
HTML page with inside JavaScript not opening in mobile Safari
I have created one .html file, a full calendar and hammer.js.
It’s working on desktop and Android devices. I can see the full calendar and gesture of swipe left and swipe right. But it’s only not ...
1
vote
1
answer
3k
views
How to include adapters and plugins with ChartJS
What is the most up to date (ES6) and minimal way to use Chart.js with time series data (requiring an adapter like moment.js) and zoom/pan capabilities (chartjs-plugin-zoom) using only CDN? Do you ...
1
vote
0
answers
236
views
hammer js with carousel images that contain link
I'm using hammer.js with bootstrap carousel for swiping the images left and right with the mouse and it works fine but the problem is the images are links to other pages
<div class="carousel-...
0
votes
1
answer
292
views
IOS device keyboard not opening on single tap event itext insert fabricjs hammerjs with Angular 9
I am using fabricjs for canvas and hammerjs for touch event with Angular 9. I have a single tap event of hammerjs which creates an object of fabric's IText. Single tapping creates the fabric and ...
0
votes
2
answers
2k
views
Cannot find type definition file for 'hammerjs'
While trying to run my project ionic cordova run Android it will show error:-
[13:07:43] typescript error
Cannot find type definition file for 'hammerjs'.
TypeError: Cannot read ...
0
votes
0
answers
23
views
How to do something slowly in Javascript? [duplicate]
I'd like to set a timeout to make it appear as if a card is being thrown to the right when the user presses the right arrow key. The function is a part of an object. Ideally, i'd like to write ...
0
votes
1
answer
401
views
hammerjs gestures not working on angular version 11?
I've been trying to setup hammerjs for simple swipe gestures, it's been now 2 days that I can not set it up, and I can't even find some sources to get it done.
I am confused if Angular is supporting ...
2
votes
1
answer
2k
views
Swipe Button with Javascript
I really am struggling to put a swipe functionality on my toggle button. I have tried hammer.js, jQuery Mobile and now I am trying to use regular javascript. I really need some help and guidance on ...
1
vote
0
answers
64
views
Hammer.js Slide Function not working with my toggle
Not sure what I'm doing wrong with the hammer.js slide functionality. I want to just put a simple slide gesture so the user can slide the button on mobile. Would appreciate any insight to my errors
I ...
1
vote
2
answers
307
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 ...
6
votes
4
answers
7k
views
App won't recognize gestures, like pan, using Hammer.JS in Angular 11
I can't recognize any gestures, such as swipe, pan, in my Angular app using Hammer.JS. It's set up like this:
package.json:
"@angular/core": "11.0.5",
"@angular/platform-...
0
votes
1
answer
220
views
Can't bind data with hammerjs
I'm sliding on screen and getting x coordinate with hammerjs and on same time I'm trying to view the value of x on HTML template through data binding. As I slide, the value of x is changing in console ...
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 ...
3
votes
0
answers
424
views
How to implement long press (tap & hold) using angular in iphone ,safari
I have tried hammerjs press,pressup events,pointerup,pointerdown events.These works in chrome and android perfectly but not working in iphone and safari.Also tried to use hostlisener event but not ...
7
votes
2
answers
4k
views
Dependency on 'hammerjs'. CommonJS or AMD dependencies can cause optimization bailouts
I am working on an angular application with Angular CLI 11.0.2 and I am using hammerJS in my application to handle the swipe events.
When I compile the application, I have the following warning ...
0
votes
0
answers
361
views
How to get touch coordinates in hammerjs?
Can anybody tell me how to get touch coordinates in hammerjs?
Following code is giving error:
hammerEvent.on('pan', (ev) => {
console.log('x, y: ', ev.clientX, ev.clientY);
}
-1
votes
1
answer
296
views
Property 'maxPointers' does not exist on type 'HammerInput'
Execution of code is not giving any error. But VSCode is giving this error. Saying property 'maxPointers' does not exist on type 'HammerInput'. Though it exists when I see in console. But how to ...
3
votes
1
answer
197
views
hammer.js dragging not start 'till finger stop on ipad screen
Dragging with hammer.js works on browser on pc. It fires continuously but when it comes to iPad, there is little problem. It fires after dragging/swiping finger stops on screen
template
<v-sheet v-...
1
vote
2
answers
347
views
Functions not running when called through HammerJS
I have a component that shows information for days that are cycled through with functions dayUp() and dayDown(). They both look like the following:
dayUp() {
if (this.dayCount == 7) {
...
0
votes
1
answer
106
views
Long tap doesn't work on Raspberry Pi touchscreen
I'm using HammerJS in an Angular app running in Electron on a Raspberry Pi with a touchscreen. I want my user to be able to tap for as long as they want (especially for old people).
Here is my Angular ...
0
votes
1
answer
327
views
HammerJS in Angular 9 pinchin pinchout text is not selectable
Hi guys so I've noticed that when using (pinchin) or (pinchout) events in a component the text inside of it is no longer selectable. I see this issue has already been corrected in hammerjs github page ...
1
vote
0
answers
355
views
Angular 10 - Cannot get touch event from HammerJS
I want to integrate pinch gesture on a square div.
Live example Angular 9
Problem, when I run it locally, npm start fails. I've managed to start it on Angular 10 through ng update. Then the library no ...
2
votes
1
answer
3k
views
Hammer_gesture_config import error after updating angular project from 7 to 10
I updated Angular application to v10 and now i get this import error on GestureConfig.
import GestureConfig
Module '"../../node_modules/@angular/material/core"' has no exported member '...
1
vote
1
answer
285
views
ngFor with Hammer JS swipe function in Angular 7
While using Hammer js swipe function with *ngFor in angular.The result expected was a swipe for particular index of tile and that tile will be removed. But by doing that the animation is not working ...
0
votes
1
answer
354
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 ...
3
votes
0
answers
250
views
Ionic:Vertical scroll not working after adding HAMMER_GESTURE_CONFIG
i am using "@ionic/angular": "5.0.7" and
i am trying to use import { LongPressModule } from 'ionic-long-press'; and using provider with hammergestureconfig { provide: ...
-1
votes
1
answer
2k
views
Hammer.js swipe left gesture animation in Angular
I'm trying to have a swipe animation when user swipes left in the device.
Here's a gist of the problem
When I click on about page button in Home page, the app smoothly navigates to About page.
When I ...
2
votes
1
answer
228
views
Hammer.js swipe does not working on rotated iframe
I made an iframe on the page and rotated it by transform.
body.rotate iframe {
transform: rotate(90deg);
transform-origin: top right;
position: absolute;
top: 100%;
...
1
vote
1
answer
921
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 ...