2
0

fix: 🐛 Minor changes and improved accessibility

This commit is contained in:
Baptiste Arnaud
2022-03-24 11:44:34 +01:00
parent bcff2e0c14
commit b784e8918e
9 changed files with 24 additions and 8 deletions

View File

@ -36,6 +36,7 @@ export const Graph = ({
setGraphPosition: setGlobalGraphPosition,
setOpenedStepId,
updateBlockCoordinates,
setPreviewingEdge,
} = useGraph()
const [graphPosition, setGraphPosition] = useState(graphPositionDefaultValue)
const [debouncedGraphPosition] = useDebounce(graphPosition, 200)
@ -98,7 +99,10 @@ export const Graph = ({
if (isRightClick) e.stopPropagation()
}
const handleClick = () => setOpenedStepId(undefined)
const handleClick = () => {
setOpenedStepId(undefined)
setPreviewingEdge(undefined)
}
useEventListener('wheel', handleMouseWheel, graphContainerRef.current)
useEventListener('mousedown', handleCaptureMouseDown, undefined, {