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:
Will Crichton 2021-02-16 17:50:46 -05:00 committed by GitHub
parent b1be34c6a0
commit 7e0c6ee097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 33 additions and 6 deletions

View file

@ -238,7 +238,7 @@ impl Canvas {
pub fn on_cursor_move<F>(&mut self, handler: F)
where
F: 'static + FnMut(i32, PhysicalPosition<f64>, ModifiersState),
F: 'static + FnMut(i32, PhysicalPosition<f64>, PhysicalPosition<f64>, ModifiersState),
{
match &mut self.mouse_state {
MouseState::HasPointerEvent(h) => h.on_cursor_move(&self.common, handler),