-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing support for .stationary
touches
#51
Comments
For a comparison, on the iPad I see the following event when do release a single finger in two-finger gesture:
With the
It seems that Hammer have to simulate still active touches with |
My early investigation results represents that sending only public func fingerUp(_ indices: [FingerIndex?] = .automatic) throws {
let indices = try self.fillExistingFingerIndices(indices, withMinimum: 1)
let endingFingers = self.activeTouches.fingers.map { finger in
return FingerInfo(fingerIndex: finger.fingerIndex,
location: finger.location,
phase: indices.contains(finger.fingerIndex) ? .ended : .stationary,
pressure: 0, twist: 0, majorRadius: kDefaultRadius, minorRadius: kDefaultRadius)
}
try self.sendEvent(hand: HandInfo(fingers: endingFingers.filter({ $0.phase == .stationary })))
} |
From the production-ready implementation it would be a challenge to correctly remove ended touches as we do report only the stationary one so no downstream code for cleanup would be called. |
.stationary
touches
Describe the bug
After two finger downs it is not possible to up single finger – both touches are ending
To Reproduce
Code to reproduce:
Expected behavior
Single finger released allowing to manipulate the second one.
I have a scenario where I do zooming then release one finger and starting to pan the map view.
Screenshots
If applicable, add screenshots to help explain your problem.
There is an extra framework to visualise touches with handling phases and locations via
UIApplication.sendEvent
. Circle animation starts when touch in the Ended phase was received.hammer_two_fingers_one_release_bug.mov
Environment (please complete the following information):
Additional context
UIApplication.sendEvent
receives two UITouch events with the Ended phase.Add any other context about the problem here.
Full UIApplication.sendEvent events report from sample code
The text was updated successfully, but these errors were encountered: