biodiv / contactjs

Pointer gestures for your webapp
MIT License
77 stars 6 forks source link

DualPointerGesture GestureEventData: recalculate global parameters #18

Open biodiv opened 2 years ago

biodiv commented 2 years ago

Scenario: user pans element with one finger to another place. Then adds second finger and pinches. The GestureEventData.global.scale is then sometimes off because the initial position of the first finger is used in the calculation. Using the position of the finger when the gesture (pinch) is detected for the first time instead of when the pointer hit the surface for the first time for GestureEventData.global should fix this problem.