Skip to content

Commit

Permalink
Correct docs for TouchpadRotate event
Browse files Browse the repository at this point in the history
  • Loading branch information
jsatka committed Aug 16, 2022
1 parent 1553dbf commit 0c37d9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/touchpad_gestures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ fn main() {
}
WindowEvent::TouchpadRotate { delta, .. } => {
if delta > 0.0 {
println!("Rotated left {}", delta);
println!("Rotated counterclockwise {}", delta);
} else {
println!("Rotated right {}", delta);
println!("Rotated clockwise {}", delta);
}
}
_ => (),
Expand Down
8 changes: 5 additions & 3 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,12 @@ pub enum WindowEvent<'a> {

/// Touchpad rotation event with two-finger rotation gesture.
///
/// Positive delta values indicate rotation to left (counterclockwise) and
/// negative delta values indicate rotation to right (clockwise).
/// Positive delta values indicate rotation counterclockwise and
/// negative delta values indicate rotation clockwise.
///
/// At the moment, only supported on macOS.
/// ## Platform-specific
///
/// - Only available on **macOS**.
TouchpadRotate {
device_id: DeviceId,
delta: f32,
Expand Down

0 comments on commit 0c37d9d

Please sign in to comment.