mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Ported form godot: Fix spatial viewport multitouch detection support
Regression introduced by #77497
- m4gr3d
8f44765831
This commit is contained in:
parent
ee54ca3808
commit
e79ea9f3a8
@ -231,7 +231,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
|
||||
|
||||
val x = terminusEvent.x
|
||||
val y = terminusEvent.y
|
||||
if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress) {
|
||||
if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress && !dragInProgress) {
|
||||
PandemoniumLib.pan(x, y, distanceX / 5f, distanceY / 5f)
|
||||
} else if (!scaleInProgress) {
|
||||
PandemoniumInputHandler.handleMotionEvent(terminusEvent)
|
||||
@ -241,7 +241,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
|
||||
}
|
||||
|
||||
override fun onScale(detector: ScaleGestureDetector): Boolean {
|
||||
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
|
||||
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
|
||||
return false
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ internal class PandemoniumGestureHandler : SimpleOnGestureListener(), OnScaleGes
|
||||
}
|
||||
|
||||
override fun onScaleBegin(detector: ScaleGestureDetector): Boolean {
|
||||
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
|
||||
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
|
||||
return false
|
||||
}
|
||||
scaleInProgress = true
|
||||
|
Loading…
Reference in New Issue
Block a user