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/taphold.js | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js b/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js
index b788be7..3bae8f7 100644
--- a/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js
+++ b/web/public/SVGOrigin/Method-Draw-master/editor/lib/taphold.js
@@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* @author Guido Marucci Blas - guido@zaubersoftware.com
* @description Adds a handler for a custom event 'taphold' that handles a
* tap and hold on touch interfaces.
@@ -45,10 +45,10 @@
startTapAndHoldDetector.call(this, event)
var element = $(this);
element.bind(TOUCHMOVE, onTouchMove);
- element.bind(TOUCHEND, onTouchEnd);
+ element.bind(TOUCHEND, onTouchEnd);
} else {
stopTapAndHoldDetector.call(this);
- }
+ }
};
function onTouchMove(event) {
@@ -59,10 +59,10 @@
var e = event.originalEvent;
var x = (e.changedTouches) ? e.changedTouches[0].pageX: e.pageX;
var y = (e.changedTouches) ? e.changedTouches[0].pageY: e.pageY;
-
+
var tapAndHoldPoint = $(this).data("taphold.point");
var euclideanDistance = calculateEuclideanDistance(tapAndHoldPoint.x, tapAndHoldPoint.y, x, y);
-
+
if (euclideanDistance > MAX_DISTANCE_ALLOWED_IN_TAP_AND_HOLD_EVENT) {
stopTapAndHoldDetector.call(this);
}
@@ -80,7 +80,7 @@
function clear() {
tapAndHoldTimer = null;
$(this).unbind(TOUCHMOVE, onTouchMove);
- $(this).unbind(TOUCHEND, onTouchEnd);
+ $(this).unbind(TOUCHEND, onTouchEnd);
};
function startTapAndHoldDetector(event) {
@@ -102,12 +102,12 @@
function stopTapAndHoldDetector() {
clearTimeout(tapAndHoldTimer);
- clear.call(this);
+ clear.call(this);
};
$.event.special["taphold"] = {
setup: function() {
-
+
},
add: function(handleObj) {
@@ -129,8 +129,8 @@
},
teardown: function() {
-
+
}
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
--
Gitblit v1.9.1