Skip to content

How to difference between pinch and a drag? #504

Answered by dbismut
Rajdeepc asked this question in Q&A
Discussion options

You must be logged in to vote

@Rajdeepc yes, that's normal. If you want to disable your drag handler while pinching you could just do:

useGesture({
  onDrag: ({ pinching, ...state }) => {
    if(pinching) return
    yourDragLogic(state)
  },
  onPinch: (state) => yourPinchLogic(state)
})

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Rajdeepc
Comment options

@dbismut
Comment options

@Rajdeepc
Comment options

@dbismut
Comment options

@Rajdeepc
Comment options

Answer selected by dbismut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants