Skip to content

Commit

Permalink
Merge pull request #1557 from VisActor/fix/press-in-android
Browse files Browse the repository at this point in the history
Fix/press in android
  • Loading branch information
xile611 authored Nov 15, 2024
2 parents 3079760 + 79e5172 commit a47b52b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-kits",
"comment": "fix: fix press in andiord",
"type": "none"
}
],
"packageName": "@visactor/vrender-kits"
}
3 changes: 2 additions & 1 deletion packages/vrender-kits/src/event/extension/gesture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,10 @@ export class Gesture extends EventEmitter {

private getEventType(point: IPointLike) {
const { eventType, startTime, startPoints } = this;
if (eventType) {
if (eventType === 'press') {
return eventType;
}

let type;
const now = clock.now();
if (now - startTime > this.config.press.time && calcDistance(startPoints[0], point) < this.config.press.threshold) {
Expand Down

0 comments on commit a47b52b

Please sign in to comment.