From f76e09f832e71b29c7b7771c1d0aaa5858f9a20f Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 09 十月 2024 15:49:37 +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