From 0c2c8f72e6df55ebac2f4dc518efe7afcd8d0fc3 Mon Sep 17 00:00:00 2001 From: noam-heller1 <121542318+noam-heller1@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:12:21 +0300 Subject: [PATCH] Add animation duration to navigation to index (#1207) * add animation duration to navigate toIndex * remove console.log * lint --- .../gallery/src/components/gallery/proGallery/slideshowView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gallery/src/components/gallery/proGallery/slideshowView.js b/packages/gallery/src/components/gallery/proGallery/slideshowView.js index 294c402cf..c0d5c1cf3 100644 --- a/packages/gallery/src/components/gallery/proGallery/slideshowView.js +++ b/packages/gallery/src/components/gallery/proGallery/slideshowView.js @@ -902,7 +902,8 @@ class SlideshowView extends React.Component { // nextGroup, // previousItem, // previousGroup, - toIndex: (itemIdx) => this.scrollToIndex({ itemIdx, scrollDuration: 400 }), + toIndex: (itemIdx, animationDuration = 400) => + this.scrollToIndex({ itemIdx, scrollDuration: animationDuration }), // getCurrentActiveItemIndex, // getCurrentActiveGroupIndex, assignIndexChangeCallback: (func) => {