标签:
document.addEventListener("touchstart",function (){ event.preventDefault(); },false);
touch.on(obj,"",listener);
touch.on("#div1","drag",function (ev){ console.log(ev.x+","+ev.y); //移动的x/y轴距离 });
obj.style.webkitTransform = "scale("+ds+")"; //设置对于原来的放大/缩小倍数
touch.on("#div1","rotate",function (ev){ var newAngle=ev.rotation+angle; //ev.rotation 捕获当前旋转的角度 if (ev.fingerStatus == "end"){ //ev.fingerStatus 捕获当前手指状态(开始/运动/结束) angle=newAngle; } this.style.webkitTransform="rotate("+newAngle+"deg)"; //设置变换角度 });
touch.on("#div1","touchstart",function (ev){ ev.startRotate(); //可以用单指来旋转 ev.preventDefault(); });
标签:
原文地址:http://www.cnblogs.com/pan-hello/p/4563042.html