Skip to content

Commit

Permalink
fix(actions/gesture): reuse previous gesture props with inertia and m…
Browse files Browse the repository at this point in the history
…odifiers after releasing pointer

Close #995
  • Loading branch information
taye committed Nov 24, 2023
1 parent aa1bcfe commit 7eccd04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@interactjs/actions/gesture/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function updateGestureProps ({ interaction, iEvent, phase }: GestureSignalArg) {

interaction.gesture.startDistance = iEvent.distance
interaction.gesture.startAngle = iEvent.angle
} else if (ending) {
} else if (ending || interaction.pointers.length < 2) {
const prevEvent = interaction.prevEvent as GestureEvent

iEvent.distance = prevEvent.distance
Expand Down

0 comments on commit 7eccd04

Please sign in to comment.