function drag(e){
if (e.touches) e.clientX = e.touches[0].clientX;
gsap.set('.link-case', {pointerEvents: 'none'});
gsap.to('.ring-cases', {
rotationY: '-=' +( (Math.round(e.clientX)-xPos)%360 ),
// onUpdate:()=>{ gsap.set('.img', { backgroundPosition:(i)=>getBgPos(i) }) }
});
xPos = Math.round(e.clientX);
}
function dragEnd(e){// eslint-disable-line
window.removeEventListener('mousemove', drag);
window.removeEventListener('touchmove', drag);
gsap.set('.ring-cases', {cursor:'grab'});
gsap.set('.link-case', {pointerEvents: 'auto'})
}
I don't know if it's the most elegant thing, but I did it by inserting in the drag function a tween of gsap to which I give pointerEvents: 'none' and to the dragEnd function pointerEvents: 'auto'.
ty