File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,20 +191,21 @@ export const useHover = (
191191
192192 watch ( synchronousOverlayInfo , resetOverlay ) ;
193193
194- const overlayInfo = computed ( ( ) =>
195- showOverlay . value
196- ? synchronousOverlayInfo . value
197- : ( { visible : false } as Info )
198- ) ;
199-
200194 const toolStore = useToolStore ( ) ;
201- const noInfoWithoutSelect = computed ( ( ) => {
202- if ( toolStore . currentTool !== Tools . Select )
195+ const TOOLS_WITH_HOVER = [
196+ Tools . Select ,
197+ Tools . Ruler ,
198+ Tools . Rectangle ,
199+ Tools . Polygon ,
200+ ] ;
201+ const overlayInfo = computed ( ( ) => {
202+ if ( ! showOverlay . value ) return { visible : false } as Info ;
203+ if ( ! TOOLS_WITH_HOVER . includes ( toolStore . currentTool ) )
203204 return { visible : false } as Info ;
204- return overlayInfo . value ;
205+ return synchronousOverlayInfo . value ;
205206 } ) ;
206207
207- return { overlayInfo : noInfoWithoutSelect , onHover } ;
208+ return { overlayInfo, onHover } ;
208209} ;
209210
210211export const usePlacingAnnotationTool = (
You can’t perform that action at this time.
0 commit comments