fix(system): nopan doesn't work when used with panOnScroll

This commit is contained in:
moklick
2023-09-20 16:24:40 +02:00
parent d595e0b6bf
commit 8846deb8e8
+4 -1
View File
@@ -59,7 +59,10 @@ export function createFilter({
}
// if the target element is inside an element with the nopan class, we prevent panning
if (isWrappedWithClass(event, noPanClassName) && event.type !== 'wheel') {
if (
isWrappedWithClass(event, noPanClassName) &&
((!panOnScroll && event.type !== 'wheel') || (panOnScroll && event.type === 'wheel'))
) {
return false;
}