feat: mouse right click can add new comment

This commit is contained in:
hjlarry
2026-01-29 09:13:12 +08:00
parent 0495dc5085
commit 26dd6c128c
31 changed files with 160 additions and 15 deletions

View File

@ -7,8 +7,9 @@ import { ControlMode } from '../types'
export const CommentCursor: FC = memo(() => {
const controlMode = useStore(s => s.controlMode)
const mousePosition = useStore(s => s.mousePosition)
const isCommentPlacing = useStore(s => s.isCommentPlacing)
if (controlMode !== ControlMode.Comment)
if (controlMode !== ControlMode.Comment || isCommentPlacing)
return null
return (