splide
splide copied to clipboard
Added extra disabled check
#1350
Description
This PR adds an extra disabled check to the onPointerUp and onPointerMove methods in the Drag component of SplideJs. This change is necessary to improve the flexibility of combining SplideJs with other features, such as pinch zoom.
Changes
- Added an extra disabled check to the
onPointerUpmethod to prevent the event from being registered when the component is disabled. - Added an extra disabled check to the
onPointerMovemethod to prevent the slider from moving when the component is disabled.
I agree. The issue here, is that drag= falseworks, but in the onTouchMove and onTouchUp the logic is execuded even when Drag is disabled. There, event is getting prevented so we have no chance to react to it from the outside and implement something like pinch/zoom.