mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
Add DeviceEvent::MouseMove on web platform to support pointer lock (#1827)
* Add DeviceEvent::MouseMove on web platform to support pointer lock * Update changelog * Add support for stdweb too * Add mouse_delta to stdweb * Remove reference to pointer lock
This commit is contained in:
@@ -29,6 +29,13 @@ pub fn mouse_position(event: &MouseEvent) -> LogicalPosition<f64> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mouse_delta(event: &MouseEvent) -> LogicalPosition<f64> {
|
||||
LogicalPosition {
|
||||
x: event.movement_x() as f64,
|
||||
y: event.movement_y() as f64,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mouse_position_by_client(
|
||||
event: &MouseEvent,
|
||||
canvas: &HtmlCanvasElement,
|
||||
|
||||
Reference in New Issue
Block a user