From 0783d73dec977a4e95b5ea623d30c26e7d222f53 Mon Sep 17 00:00:00 2001 From: Tom Marien Date: Thu, 18 Aug 2016 15:25:18 +0200 Subject: [PATCH] Wait for animation to finish before moving to previous slide Inline with nextSlide: don't do anything if locked (animation still busy) --- src/directives/rn-carousel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/directives/rn-carousel.js b/src/directives/rn-carousel.js index 7f13d03..de9503e 100755 --- a/src/directives/rn-carousel.js +++ b/src/directives/rn-carousel.js @@ -264,7 +264,9 @@ if (index < 0) { index = currentSlides.length - 1; } - goToSlide(index, slideOptions); + if (!locked) { + goToSlide(index, slideOptions); + } }; function goToSlide(index, slideOptions) {