uiuniversal / ngu-carousel

Angular Universal carousel
https://ngu-carousel.netlify.app
MIT License
331 stars 105 forks source link

Stop slideing when touched #166

Open whimzyLive opened 5 years ago

whimzyLive commented 5 years ago

h2.Background: I am using ngu-carousel in my angular app, and is working brilliantly, but now the problem that I am facing is to stop sliding when touched/clicked.

h3.Use Case I have images and videos inside slider and would like to have auto sliding on initially and when someone clicks/touches (i.e playing a video) slider should stop auto sliding.

h3.Potential solution ngu-carousel should accept NguCarouselConfig as observable and subscribe to it. May be?

I will be happy to do PR if guided to what else depends on config.

dima-gusyatiner commented 4 years ago

I also have issues with the slider when touched, for me:

GregKlarecky commented 4 years ago

try putting event.preventDefault() on dragstart event on your images and moving cdr.detectChanges() to the place where carousel data for dataSource input is initialized. Put ngIf on your carousel wrapper *ngIf="dataSource"