fix handleModeComment

This commit is contained in:
hjlarry
2025-09-23 15:35:28 +08:00
parent 31cba28e8a
commit c28a32fc47
3 changed files with 12 additions and 19 deletions

View File

@ -70,9 +70,18 @@ export const useWorkflowMoveMode = () => {
handleSelectionCancel()
}, [getNodesReadOnly, setControlMode, handleSelectionCancel])
const handleModeComment = useCallback(() => {
if (getNodesReadOnly())
return
setControlMode(ControlMode.Comment)
handleSelectionCancel()
}, [getNodesReadOnly, setControlMode, handleSelectionCancel])
return {
handleModePointer,
handleModeHand,
handleModeComment,
}
}