我正在尝试实现捏,放大,放大,js。我就快到了,因为我已经计算了如何用触摸事件来检测js中的捏、变焦、放大。if (ev.targetTouches.length == 2) {//check if two fingers touched screen// Check if the two target touches are the same ones
我写了一个在正方形边缘找到坐标的计算,但结果却是一个很长的嵌套条件。在进行了一些简化并找到了常见的部分之后,我得出了下面的示例: // and are markers for the centers of the two locations connecting let ty; const dy = targetY - sourceY;
const adjY =