Web: Fullscreen Overhaul (#3063)
This commit is contained in:
parent
1dfca5a395
commit
0c8cf94a70
10 changed files with 225 additions and 148 deletions
|
|
@ -49,6 +49,14 @@ impl AnimationFrameHandler {
|
|||
|
||||
self.handle.set(Some(handle));
|
||||
}
|
||||
|
||||
pub fn cancel(&mut self) {
|
||||
if let Some(handle) = self.handle.take() {
|
||||
self.window
|
||||
.cancel_animation_frame(handle)
|
||||
.expect("Failed to cancel animation frame");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for AnimationFrameHandler {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue