@@ -12,22 +12,22 @@ import { getCompositeComponentFromElement, hasValidParent } from './utils';
1212
1313export type States =
1414 | {
15- kind : 'inspecting' ;
16- hoveredDomElement : HTMLElement | null ;
17- propContainer : HTMLDivElement ;
18- }
15+ kind : 'inspecting' ;
16+ hoveredDomElement : HTMLElement | null ;
17+ propContainer : HTMLDivElement ;
18+ }
1919 | {
20- kind : 'inspect-off' ;
21- propContainer : HTMLDivElement ;
22- }
20+ kind : 'inspect-off' ;
21+ propContainer : HTMLDivElement ;
22+ }
2323 | {
24- kind : 'focused' ;
25- focusedDomElement : HTMLElement ;
26- propContainer : HTMLDivElement ;
27- }
24+ kind : 'focused' ;
25+ focusedDomElement : HTMLElement ;
26+ propContainer : HTMLDivElement ;
27+ }
2828 | {
29- kind : 'uninitialized' ;
30- } ;
29+ kind : 'uninitialized' ;
30+ } ;
3131
3232export const INSPECT_TOGGLE_ID = 'react-scan-inspect-element-toggle' ;
3333export const INSPECT_OVERLAY_CANVAS_ID = 'react-scan-inspect-canvas' ;
@@ -73,6 +73,7 @@ export const createInspectElementStateMachine = () => {
7373 }
7474
7575 const clearCanvas = ( ) => {
76+ cancelAnimationFrame ( animationId )
7677 ctx . save ( ) ;
7778
7879 ctx . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) ;
@@ -333,7 +334,7 @@ export const createInspectElementStateMachine = () => {
333334 if (
334335 adjustedX >= currentLockIconRect . x &&
335336 adjustedX <=
336- currentLockIconRect . x + currentLockIconRect . width &&
337+ currentLockIconRect . x + currentLockIconRect . width &&
337338 adjustedY >= currentLockIconRect . y &&
338339 adjustedY <= currentLockIconRect . y + currentLockIconRect . height
339340 ) {
0 commit comments