Commit ada20c7f authored by shiyunjie's avatar shiyunjie

update viewer

parent c072b64e
......@@ -109,12 +109,12 @@ See https://github.com/adobe-type-tools/cmap-resources
document.addEventListener("touchmove", (e) => {
if (e.scale !== 1 && isiOSXZ ) {
e.preventDefault();
//e.preventDefault();
}
}, { passive: false });
viewer.addEventListener("touchstart", (e) => {
e.preventDefault();
//e.preventDefault();
if (e.touches.length > 1) {
startX = (e.touches[0].pageX + e.touches[1].pageX) / 2;
startY = (e.touches[0].pageY + e.touches[1].pageY) / 2;
......@@ -122,7 +122,7 @@ See https://github.com/adobe-type-tools/cmap-resources
} else {
initialPinchDistance = 0;
}
});
},false);
viewer.addEventListener("touchmove", (e) => {
console.log('viewer_touchmove')
......@@ -137,7 +137,7 @@ See https://github.com/adobe-type-tools/cmap-resources
viewer.style.transform = `scale(${pinchScale})`;
viewer.style.transformOrigin = `${originX}px ${originY}px`;
});
},false);
viewer.addEventListener("touchend", (e) => {
if (initialPinchDistance <= 0) { return; }
......@@ -153,7 +153,7 @@ See https://github.com/adobe-type-tools/cmap-resources
container.scrollTop += dy * (pinchScale - 1);
reset();
});
},false);
}
enablePinchZoom();
/* if(!isWeixin){
......
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