From 93f1480ab20827635a10918ac5ab8366254bd761 Mon Sep 17 00:00:00 2001 From: Ismail9k Date: Fri, 15 Nov 2024 20:38:41 +0300 Subject: [PATCH] feat(config): remove throttle value --- src/components/Carousel.ts | 2 +- src/partials/defaults.ts | 1 - src/partials/props.ts | 5 ----- src/types/carousel.ts | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/Carousel.ts b/src/components/Carousel.ts index 6b12dee3..b743d9b4 100644 --- a/src/components/Carousel.ts +++ b/src/components/Carousel.ts @@ -214,7 +214,7 @@ export default defineComponent({ dragged.y = deltaY dragged.x = deltaX - }, config.throttle) + }) function handleDragEnd(): void { const direction = config.dir === 'rtl' ? -1 : 1 diff --git a/src/partials/defaults.ts b/src/partials/defaults.ts index 72143dd4..f6f84a24 100644 --- a/src/partials/defaults.ts +++ b/src/partials/defaults.ts @@ -22,7 +22,6 @@ export const DEFAULT_CONFIG: CarouselConfig = { transition: 300, autoplay: 0, gap: 0, - throttle: 16, wrapAround: false, pauseAutoplayOnHover: false, mouseDrag: true, diff --git a/src/partials/props.ts b/src/partials/props.ts index fcc5c697..20cd4ddb 100644 --- a/src/partials/props.ts +++ b/src/partials/props.ts @@ -21,11 +21,6 @@ export const carouselProps = { default: DEFAULT_CONFIG.wrapAround, type: Boolean, }, - // control max drag - throttle: { - default: DEFAULT_CONFIG.throttle, - type: Number, - }, // control the gap between slides gap: { default: DEFAULT_CONFIG.gap, diff --git a/src/types/carousel.ts b/src/types/carousel.ts index 3fbde6d3..2c17657e 100644 --- a/src/types/carousel.ts +++ b/src/types/carousel.ts @@ -19,7 +19,6 @@ export interface CarouselConfig { itemsToScroll: number modelValue?: number transition?: number - throttle: number gap: number autoplay?: number snapAlign: SnapAlign