mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Let's see if this fixes flash of cut-off images on Mobile Safari
This commit is contained in:
parent
38b844db81
commit
5bbff378d3
1 changed files with 5 additions and 1 deletions
|
@ -49,7 +49,11 @@ function Media({ media, to, showOriginal, autoAnimate, onClick = () => {} }) {
|
|||
if (media) {
|
||||
const value = make3dTransformValue({ x, y, scale });
|
||||
|
||||
media.style.setProperty('transform', value);
|
||||
if (scale === 1) {
|
||||
media.style.removeProperty('transform');
|
||||
} else {
|
||||
media.style.setProperty('transform', value);
|
||||
}
|
||||
|
||||
media.closest('.media-zoom').style.touchAction =
|
||||
scale <= 1 ? 'pan-x' : '';
|
||||
|
|
Loading…
Reference in a new issue