From 664db98c9e8595ce4dd636a27f480e3a08b81ff5 Mon Sep 17 00:00:00 2001 From: xyc <jc_xiong@hotmail.com> Date: 星期五, 21 二月 2025 11:13:51 +0800 Subject: [PATCH] 新增可忽略的维修时间 --- web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js index 7db1544..8d3acb6 100644 --- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/touch.js +++ b/web/public/SVGOrigin/Method-Draw-master/editor/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