Allow pan carousel when image scale = 1

This commit is contained in:
Lim Chee Aun 2023-03-28 10:26:27 +08:00
parent 64953f9bd3
commit 24e90a5cdb

View file

@ -48,6 +48,8 @@ function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) {
const value = make3dTransformValue({ x, y, scale });
img.style.setProperty('transform', value);
img.closest('.media-zoom').style.touchAction = scale === 1 ? 'pan-x' : '';
}
}, []);