Checkpoint

This commit is contained in:
Nathan Sobo
2023-10-09 21:30:14 -06:00
parent 9fe5836240
commit dfdb691f73
2 changed files with 65 additions and 74 deletions
+4 -4
View File
@@ -161,10 +161,10 @@ impl Event {
NSEventType::NSScrollWheel => window_height.map(|window_height| {
let phase = match native_event.phase() {
NSEventPhase::NSEventPhaseMayBegin | NSEventPhase::NSEventPhaseBegan => {
Some(TouchPhase::Started)
TouchPhase::Started
}
NSEventPhase::NSEventPhaseEnded => Some(TouchPhase::Ended),
_ => Some(TouchPhase::Moved),
NSEventPhase::NSEventPhaseEnded => TouchPhase::Ended,
_ => TouchPhase::Moved,
};
let raw_data = point(
@@ -184,7 +184,7 @@ impl Event {
window_height - px(native_event.locationInWindow().y as f32),
),
delta,
phase,
touch_phase: phase,
modifiers: read_modifiers(native_event),
})
}),