From f9a269137a10e4f6d75948babb76422fa10ea05c Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 22 Oct 2019 14:21:28 +0700 Subject: [PATCH] fixed normalizer to 25% --- src/components/node/NodeImageSlideBlock/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/node/NodeImageSlideBlock/index.tsx b/src/components/node/NodeImageSlideBlock/index.tsx index d26a4d57..6060f3d2 100644 --- a/src/components/node/NodeImageSlideBlock/index.tsx +++ b/src/components/node/NodeImageSlideBlock/index.tsx @@ -106,7 +106,7 @@ const NodeImageSlideBlock: FC = ({ node, is_loading, updateLayout }) => const shift = (initial_offset - offset) / wrap_width; // percent / 100 const diff = initial_offset - (shift > 0 ? Math.ceil(shift) : Math.floor(shift)) * wrap_width; const new_offset = - Math.abs(shift) > 0.33 + Math.abs(shift) > 0.25 ? Math.min(Math.max(diff, wrap_width - slide_width), 0) // next or prev slide : Math.round(offset / wrap_width) * wrap_width; // back to this one