From 1696a5ccc97a923f65eaf3a554eabce2436bc510 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期二, 05 十一月 2024 16:20:00 +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