Support pinch, double tap and rotation gestures on iOS (#3130)
This is off by default on iOS. Note that pinch delta may be NaN. Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
parent
30775f4982
commit
6b29253797
10 changed files with 362 additions and 34 deletions
|
|
@ -695,7 +695,7 @@ declare_class!(
|
|||
_ => return,
|
||||
};
|
||||
|
||||
self.queue_event(WindowEvent::TouchpadMagnify {
|
||||
self.queue_event(WindowEvent::PinchGesture {
|
||||
device_id: DEVICE_ID,
|
||||
delta: unsafe { event.magnification() },
|
||||
phase,
|
||||
|
|
@ -706,7 +706,7 @@ declare_class!(
|
|||
fn smart_magnify_with_event(&self, _event: &NSEvent) {
|
||||
trace_scope!("smartMagnifyWithEvent:");
|
||||
|
||||
self.queue_event(WindowEvent::SmartMagnify {
|
||||
self.queue_event(WindowEvent::DoubleTapGesture {
|
||||
device_id: DEVICE_ID,
|
||||
});
|
||||
}
|
||||
|
|
@ -724,7 +724,7 @@ declare_class!(
|
|||
_ => return,
|
||||
};
|
||||
|
||||
self.queue_event(WindowEvent::TouchpadRotate {
|
||||
self.queue_event(WindowEvent::RotationGesture {
|
||||
device_id: DEVICE_ID,
|
||||
delta: unsafe { event.rotation() },
|
||||
phase,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue