@@ -411,8 +411,7 @@ impl ApplicationHandler<UserEvent> for VelloApp {
411
411
valid_surface,
412
412
..
413
413
} ) = & self . state
414
- {
415
- if * valid_surface
414
+ && * valid_surface
416
415
&& touch. location . y > surface. config . height as f64 * 2. / 3.
417
416
{
418
417
self . navigation_fingers . insert ( touch. id ) ;
@@ -423,7 +422,6 @@ impl ApplicationHandler<UserEvent> for VelloApp {
423
422
self . scene_ix = self . scene_ix . saturating_add ( 1 ) ;
424
423
}
425
424
}
426
- }
427
425
}
428
426
TouchPhase :: Ended | TouchPhase :: Cancelled => {
429
427
// We intentionally ignore the result here
@@ -485,11 +483,10 @@ impl ApplicationHandler<UserEvent> for VelloApp {
485
483
x : position. x ,
486
484
y : position. y ,
487
485
} ;
488
- if self . mouse_down {
489
- if let Some ( prior) = self . prior_position {
486
+ if self . mouse_down
487
+ && let Some ( prior) = self . prior_position {
490
488
self . transform = self . transform . then_translate ( position - prior) ;
491
489
}
492
- }
493
490
self . prior_position = Some ( position) ;
494
491
}
495
492
WindowEvent :: RedrawRequested => {
@@ -578,14 +575,12 @@ impl ApplicationHandler<UserEvent> for VelloApp {
578
575
if let Some ( profiling_result) = self . renderers [ surface. dev_id ]
579
576
. as_mut ( )
580
577
. and_then ( |renderer| renderer. profile_result . take ( ) )
581
- {
582
- if self . profile_stored . is_none ( )
583
- || self . profile_taken . elapsed ( ) > Duration :: from_secs ( 1 )
578
+ && ( self . profile_stored . is_none ( )
579
+ || self . profile_taken . elapsed ( ) > Duration :: from_secs ( 1 ) )
584
580
{
585
581
self . profile_stored = Some ( profiling_result) ;
586
582
self . profile_taken = Instant :: now ( ) ;
587
583
}
588
- }
589
584
#[ cfg( feature = "wgpu-profiler" ) ]
590
585
if let Some ( profiling_result) = self . profile_stored . as_ref ( ) {
591
586
stats:: draw_gpu_profiling (
0 commit comments