SaeedSpate / ngx-gallery-9

Angular Image Gallery based on Ngx-Gallery
MIT License
28 stars 18 forks source link

Swipe Not Working #2

Open pouyada opened 4 years ago

pouyada commented 4 years ago

The swipe is not working. I tried all the fixes recommended in community but no chance.

here are the configs:

this.galleryOptions = [ { width: '100%', height: '600px', thumbnailsColumns: 4, lazyLoading: false, imageAnimation: NgxGalleryAnimation.Slide, imageArrows: true, thumbnailsArrows: true, imageSwipe: true, thumbnailsSwipe: true, previewSwipe: true, thumbnailsRemainingCount: true }, { breakpoint: 960, width: '100%', height: '450px', preview: true, imagePercent: 80, thumbnailsPercent: 20, thumbnailsMargin: 20, thumbnailMargin: 10 }, { breakpoint: 400, height: '300px', thumbnailsPercent: 40, thumbnailsColumns: 3, thumbnailMargin: 10 }

amitsinghrawat1994 commented 4 years ago

Hi, @pouyada I am also facing the same swipe is not working problem. have you found a solution for swiping?

pouyada commented 4 years ago

Hi, @pouyada I am also facing the same swipe is not working problem. have you found a solution for swiping?

No man, I tried every possible way but no result :(

lucky0007 commented 4 years ago

Swipe is not working in angular 10. Can anyone knows how to resolve it?

amitsinghrawat1994 commented 4 years ago

For the swapping to work I have to import HammerModule to my app.module.ts file

Refrence => https://dev.to/susomejias/solution-working-hammer-js-after-upgrading-to-angular-9-25n2

pouyada commented 4 years ago

For the swapping to work I have to import HammerModule to my app.module.ts file

Refrence => https://dev.to/susomejias/solution-working-hammer-js-after-upgrading-to-angular-9-25n2

This didn't help me

amitsinghrawat1994 commented 4 years ago

@pouyada
You can try. Add import 'hammerjs'; to your component where using ngx-gallery-9

pouyada commented 4 years ago

@pouyada You can try. Add import 'hammerjs'; to your component where using ngx-gallery-9

Tried also this, no help

ghost commented 4 years ago

If you include the hammer like this it will not work,

import { BrowserModule, HammerModule } from '@angular/platform-browser';

imports: [
 HammerModule
  ],

However, if you install and import on the component the swap will work

npm install hammerjs --save
import 'hammerjs';