File tree Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Expand file tree Collapse file tree 1 file changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { pointRadial } from 'd3-shape';
7
7
import useForceUpdate from './useForceUpdate' ;
8
8
import LinkControls from './LinkControls' ;
9
9
import getLinkComponent from './getLinkComponent' ;
10
+ import { localPoint } from '@visx/event' ;
10
11
import { onHover , onHoverExit } from '../actions/actions' ;
11
12
import { useStoreContext } from '../store' ;
12
13
@@ -89,6 +90,10 @@ export default function ComponentMap({
89
90
sizeHeight = innerWidth ;
90
91
}
91
92
}
93
+
94
+ //mousing controls
95
+ const handleMouseOver = ( ) => console . log ( "mouse entered" ) ;
96
+
92
97
// controls for the map
93
98
const LinkComponent = getLinkComponent ( { layout, linkType, orientation } ) ;
94
99
return totalWidth < 10 ? null : (
@@ -181,30 +186,8 @@ export default function ComponentMap({
181
186
forceUpdate ( ) ;
182
187
} }
183
188
//check with recoil
184
- onMouseLeave = { ( ) => {
185
- if (
186
- Object . keys ( node . data . recoilDomNode ) . length > 0
187
- ) {
188
- dispatch (
189
- onHoverExit (
190
- node . data . recoilDomNode [ node . data . name ]
191
- )
192
- ) ;
193
- } else {
194
- dispatch ( onHoverExit ( node . data . rtid ) ) ;
195
- }
196
- } }
197
- onMouseEnter = { ( ) => {
198
- if (
199
- Object . keys ( node . data . recoilDomNode ) . length > 0
200
- ) {
201
- dispatch (
202
- onHover ( node . data . recoilDomNode [ node . data . name ] )
203
- ) ;
204
- } else {
205
- dispatch ( onHover ( node . data . rtid ) ) ;
206
- }
207
- } }
189
+ onMouseOver = { handleMouseOver }
190
+ onMouseOut = { hideTooltip }
208
191
/>
209
192
) }
210
193
{ /* Display text inside of each component node */ }
You can’t perform that action at this time.
0 commit comments