diff --git a/projects/kit/components/carousel/carousel.component.ts b/projects/kit/components/carousel/carousel.component.ts index c0fc8d43d8cd..11aaf8baf178 100644 --- a/projects/kit/components/carousel/carousel.component.ts +++ b/projects/kit/components/carousel/carousel.component.ts @@ -53,10 +53,10 @@ import {TuiCarouselScroll} from './carousel-scroll.directive'; host: { '[class._transitioned]': 'transitioned', '[class._draggable]': 'draggable', - '(touchstart)': 'onTransitioned(false)', - '(touchend)': 'onTransitioned(true)', - '(mousedown)': 'onTransitioned(false)', - '(document:mouseup.silent)': 'onTransitioned(true)', + '(touchstart)': 'draggable ? onTransitioned(false) : (0)', + '(touchend)': 'draggable ? onTransitioned(true): (0)', + '(mousedown)': 'draggable ? onTransitioned(false): (0)', + '(document:mouseup.silent)': 'draggable ?onTransitioned(true): (0)', }, }) export class TuiCarouselComponent { diff --git a/projects/kit/components/carousel/carousel.template.html b/projects/kit/components/carousel/carousel.template.html index a168b62ea9eb..9d5b5e26ac23 100644 --- a/projects/kit/components/carousel/carousel.template.html +++ b/projects/kit/components/carousel/carousel.template.html @@ -13,7 +13,7 @@ [style.transform]="transform" (tuiCarouselAutoscroll)="onAutoscroll()" (tuiPan)="onPan($event[0])" - (tuiSwipe)="onSwipe($event.direction)" + (tuiSwipe)="draggable ? onSwipe($event.direction) : 0" >