|
|
|
@ -99,7 +99,7 @@ export function AnnotationModal() { |
|
|
|
} = useAnnotationStore(); |
|
|
|
|
|
|
|
const updateNodeData = useWorkflowStore((state) => state.updateNodeData); |
|
|
|
const nodes = useWorkflowStore((state) => state.nodes); |
|
|
|
const nodes = useWorkflowStore((state) => state.nodes ?? []); |
|
|
|
const nodeDisplaySize = useMemo(() => { |
|
|
|
const sourceNode = sourceNodeId ? nodes.find((node) => node.id === sourceNodeId) : null; |
|
|
|
const nodeType = sourceNode?.type as NodeType | undefined; |
|
|
|
@ -135,6 +135,12 @@ export function AnnotationModal() { |
|
|
|
const textInputCreatedAt = useRef<number>(0); |
|
|
|
const containerRef = useRef<HTMLDivElement>(null); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
return () => { |
|
|
|
closeModal(); |
|
|
|
}; |
|
|
|
}, [closeModal]); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
let cancelled = false; |
|
|
|
let revokeImageSource: (() => void) | undefined; |
|
|
|
|