@@ -92,13 +92,13 @@ const settingToManipulator = (setting: ManipulatorSettings) => {
92
92
93
93
export function useInteractorStyleManipulatorSettings (
94
94
getStyle : ( ) => vtkInteractorStyle ,
95
- isExternalStyle : boolean ,
95
+ isExternalStyle : ( ) => boolean ,
96
96
settings : ManipulatorSettings [ ]
97
97
) {
98
98
useComparableEffect (
99
99
( ) => {
100
100
// Assumes external styles are externally controlled
101
- if ( isExternalStyle ) return ;
101
+ if ( isExternalStyle ( ) ) return ;
102
102
if ( ! getStyle ( ) . isA ( 'vtkInteractorStyleManipulator' ) ) return ;
103
103
104
104
const style = getStyle ( ) as vtkInteractorStyleManipulator ;
@@ -112,8 +112,8 @@ export function useInteractorStyleManipulatorSettings(
112
112
style . addMouseManipulator ( manip ) ;
113
113
} ) ;
114
114
} ,
115
- [ settings ] ,
116
- ( [ cur ] , [ prev ] ) => deepEqual ( cur , prev )
115
+ [ settings , isExternalStyle ] ,
116
+ ( cur , prev ) => deepEqual ( cur , prev )
117
117
) ;
118
118
}
119
119
@@ -143,7 +143,7 @@ export function useInteractorStyle(
143
143
) ;
144
144
145
145
const externalStyleRef = useRef < vtkInteractorStyle | null > ( null ) ;
146
- const isExternalStyle = ! ! externalStyleRef . current ;
146
+ const isExternalStyle = useCallback ( ( ) => ! ! externalStyleRef . current , [ ] ) ;
147
147
148
148
const getStyle = useCallback ( ( ) => {
149
149
return externalStyleRef . current ?? getInternalStyle ( ) ;
0 commit comments