Commit 8cdf3786 authored by ZhangHuiJian's avatar ZhangHuiJian
parents d831a0a7 f7e7b04a
...@@ -148,12 +148,12 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -148,12 +148,12 @@ See https://github.com/adobe-type-tools/cmap-resources
document.addEventListener("touchmove", (e) => { document.addEventListener("touchmove", (e) => {
if (e.scale !== 1 && isiOSXZ ) { if (e.scale !== 1 && isiOSXZ ) {
e.preventDefault(); //e.preventDefault();
} }
}, { passive: false }); }, { passive: false });
viewer.addEventListener("touchstart", (e) => { viewer.addEventListener("touchstart", (e) => {
e.preventDefault(); //e.preventDefault();
if (e.touches.length > 1) { if (e.touches.length > 1) {
startX = (e.touches[0].pageX + e.touches[1].pageX) / 2; startX = (e.touches[0].pageX + e.touches[1].pageX) / 2;
startY = (e.touches[0].pageY + e.touches[1].pageY) / 2; startY = (e.touches[0].pageY + e.touches[1].pageY) / 2;
...@@ -161,7 +161,10 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -161,7 +161,10 @@ See https://github.com/adobe-type-tools/cmap-resources
} else { } else {
initialPinchDistance = 0; initialPinchDistance = 0;
} }
}); let load = document.getElementById('loading');
load.style.width = 0;
load.innerHTML = ''
},false);
viewer.addEventListener("touchmove", (e) => { viewer.addEventListener("touchmove", (e) => {
console.log('viewer_touchmove') console.log('viewer_touchmove')
...@@ -176,7 +179,7 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -176,7 +179,7 @@ See https://github.com/adobe-type-tools/cmap-resources
viewer.style.transform = `scale(${pinchScale})`; viewer.style.transform = `scale(${pinchScale})`;
viewer.style.transformOrigin = `${originX}px ${originY}px`; viewer.style.transformOrigin = `${originX}px ${originY}px`;
}); },false);
viewer.addEventListener("touchend", (e) => { viewer.addEventListener("touchend", (e) => {
if (initialPinchDistance <= 0) { return; } if (initialPinchDistance <= 0) { return; }
...@@ -192,7 +195,7 @@ See https://github.com/adobe-type-tools/cmap-resources ...@@ -192,7 +195,7 @@ See https://github.com/adobe-type-tools/cmap-resources
container.scrollTop += dy * (pinchScale - 1); container.scrollTop += dy * (pinchScale - 1);
reset(); reset();
}); },false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment