Hi Guys
So the html div block here:
https://krpano.com/krpano.html?xm…side-krpano.xml
Can be pinch zoomed just fine on Android. However, on iOS with Safari 13.6.1 (or any safari version really), I can't pinch zoom that same html div block. Why is that?
Pinch Zoom works fine on any other site on iOS and Safari, but not on any of the html popup examples from KRPano.
I suspect it has something to do with this code:
function stopPropagation(e){ e.stopPropagation(); }
function preventDefault(e){ e.preventDefault(); }
// enable browsed-based mouse-wheel and touch-scrolling support:
div.addEventListener("wheel", stopPropagation, true);
div.addEventListener("mousewheel", stopPropagation, true);
div.addEventListener("DOMMouseScroll", stopPropagation, true);
div.addEventListener("touchstart", function(event){ if(krpano.device.ios && window.innerHeight == krpano.display.htmltarget.offsetHeight){ /* avoid the iOS 'overscrolling' for fullpage viewers */ var bs = document.body.parentNode.style; bs.position="fixed"; bs.top=0; bs.left=0; bs.right=0; bs.bottom=0; } krpano.control.preventTouchEvents = false; event.stopPropagation(); }, true);
div.addEventListener("touchend", function(event){ krpano.control.preventTouchEvents = true; event.stopPropagation(); }, true);
div.addEventListener("gesturestart", preventDefault, true);
Display More
After searching for hours. I found something that may be related. Somebody was asking why another page is not scrollable (nothing to do with KRpano), and the the answer was this:
document.addEventListener('touchmove', function (event) {
if (event.scale !== 1) { event.preventDefault(); }
}, false);
So then my question is, for Safari, with this 2nd block of code above if I just reverse the logic like so and it then stick it into the 1st block of code, would that work?