From 124659f32616723b3ae463399ef432cbbbe134fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E9=93=AE=E8=B1=AA?= Date: Thu, 2 Jun 2022 17:21:02 +0800 Subject: [PATCH] bugfix:outer scroll --- src/handlers/mouse-wheel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlers/mouse-wheel.js b/src/handlers/mouse-wheel.js index 840e269..d066f50 100644 --- a/src/handlers/mouse-wheel.js +++ b/src/handlers/mouse-wheel.js @@ -20,10 +20,10 @@ export default function(i) { let hitsBound; // pick axis with primary direction - if (Math.abs(deltaY) > Math.abs(deltaX)) { - hitsBound = isTop || isBottom; + if (Math.abs(deltaY) >= Math.abs(deltaX)) { + hitsBound = (isTop && deltaY > 0) || (isBottom && deltaY < 0); } else { - hitsBound = isLeft || isRight; + hitsBound = (isLeft && deltaX > 0) || (isRight && deltaX < 0); } return hitsBound ? !i.settings.wheelPropagation : true;