From b42429445c22164e951d514348115ee593379026 Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期六, 02 十一月 2024 18:44:54 +0800 Subject: [PATCH] 增加下载xml,禁止一键排版以及修改型号节点上级节点 --- web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js index 7db1544..8d3acb6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js +++ b/web/public/SVGOrigin/Method-Draw-master/method-draw/lib/touch.js @@ -1,25 +1,25 @@ function touchHandler(event) -{ - +{ + var touches = event.changedTouches, first = touches[0], type = ""; switch(event.type) { case "touchstart": type="mousedown"; break; - case "touchmove": type="mousemove"; break; + case "touchmove": type="mousemove"; break; case "touchend": type="mouseup"; break; default: return; } - //initMouseEvent(type, canBubble, cancelable, view, clickCount, - // screenX, screenY, clientX, clientY, ctrlKey, + //initMouseEvent(type, canBubble, cancelable, view, clickCount, + // screenX, screenY, clientX, clientY, ctrlKey, // altKey, shiftKey, metaKey, button, relatedTarget); - + var simulatedEvent = document.createEvent("MouseEvent"); - simulatedEvent.initMouseEvent(type, true, true, window, 1, - first.screenX, first.screenY, - first.clientX, first.clientY, false, + simulatedEvent.initMouseEvent(type, true, true, window, 1, + first.screenX, first.screenY, + first.clientX, first.clientY, false, false, false, false, 0/*left*/, null); if(touches.length < 2) { first.target.dispatchEvent(simulatedEvent); -- Gitblit v1.9.1