Skip to content

Commit

Permalink
Merge pull request #1635 from VisActor/fix/gesture-compatible
Browse files Browse the repository at this point in the history
fix: fix issue with gesture emitEvent when gesture is released
  • Loading branch information
neuqzxy authored Dec 23, 2024
2 parents 1f98299 + 80a1ee5 commit 9989f85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-kits",
"comment": "fix: fix issue with gesture emitEvent when gesture is released",
"type": "none"
}
],
"packageName": "@visactor/vrender-kits"
}
3 changes: 3 additions & 0 deletions packages/vrender-kits/src/event/extension/gesture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ export class Gesture extends EventEmitter {
}

private emitEvent(type: string, e: GestureEvent) {
if (!this.element) {
return;
}
const events = (this.element as unknown as any)._events;
const listeners = events[WILDCARD];
if (listeners) {
Expand Down

0 comments on commit 9989f85

Please sign in to comment.