From 0955f777634b81159a42cc08531370e4feab6752 Mon Sep 17 00:00:00 2001 From: PP_Pro Date: Mon, 11 Sep 2023 11:20:26 +0800 Subject: [PATCH] remove `_cloneTouch()` method on touch-manager --- pal/input/touch-manager.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pal/input/touch-manager.ts b/pal/input/touch-manager.ts index aadaf422997..5fc19e555e3 100644 --- a/pal/input/touch-manager.ts +++ b/pal/input/touch-manager.ts @@ -41,22 +41,6 @@ class TouchManager { this._touchMap = new Map(); } - /** - * The original touch object can't be modified, so we need to return the cloned touch object. - * @param touch - * @returns - */ - private _cloneTouch (touch: Touch): Touch { - const touchID = touch.getID(); - touch.getStartLocation(tempVec2); - const clonedTouch = new Touch(tempVec2.x, tempVec2.y, touchID); - touch.getLocation(tempVec2); - clonedTouch.setPoint(tempVec2.x, tempVec2.y); - touch.getPreviousLocation(tempVec2); - clonedTouch.setPrevPoint(tempVec2); - return clonedTouch; - } - /** * Create the touch object at the touch start event callback. * we have some policy to create the touch object: