Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ class PinchGestureHandler : GestureHandler<PinchGestureHandler>() {
scaleGestureDetector = ScaleGestureDetector(context, gestureListener)
val configuration = ViewConfiguration.get(context)
spanSlop = configuration.scaledTouchSlop.toFloat()

// set the focal point to the position of the first pointer as NaN causes the event not to arrive
this.focalPointX = event.x
this.focalPointY = event.y

begin()
}
scaleGestureDetector?.onTouchEvent(sourceEvent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ class RotationGestureHandler : GestureHandler<RotationGestureHandler>() {
if (state == STATE_UNDETERMINED) {
resetProgress()
rotationGestureDetector = RotationGestureDetector(gestureListener)

// set the anchor to the position of the first pointer as NaN causes the event not to arrive
this.anchorX = event.x
this.anchorY = event.y

begin()
}
rotationGestureDetector?.onTouchEvent(sourceEvent)
Expand Down