@@ -27,7 +27,7 @@ interface IONodeProps {
2727}
2828
2929const IONode = ( { type, data, selected = false } : IONodeProps ) => {
30- const { getInputNodeId , getOutputNodeId } = useNodeManager ( ) ;
30+ const { getNodeId , getHandleNodeId } = useNodeManager ( ) ;
3131 const { graphSpec, componentSpec } = useComponentSpec ( ) ;
3232 const { setContent, clearContent } = useContextPanel ( ) ;
3333
@@ -58,21 +58,24 @@ const IONode = ({ type, data, selected = false }: IONodeProps) => {
5858 [ componentSpec . outputs , spec . name ] ,
5959 ) ;
6060
61- const nodeId = isInput
62- ? getInputNodeId ( inputNameToInputId ( spec . name ) )
63- : getOutputNodeId ( outputNameToOutputId ( spec . name ) ) ;
61+ const inputId = inputNameToInputId ( spec . name ) ;
62+ const outputId = outputNameToOutputId ( spec . name ) ;
63+ const id = isInput ? inputId : outputId ;
6464
65- const nodeHandleId = `${ nodeId } _handle` ;
65+ const nodeId = getNodeId ( id , type ) ;
66+
67+ const handleNodeType = isInput ? "outputHandle" : "inputHandle" ;
68+ const nodeHandleId = getHandleNodeId ( id , "handle" , handleNodeType ) ;
6669
6770 const handleHandleClick = useCallback ( ( ) => {
6871 if ( ENABLE_DEBUG_MODE ) {
69- console . log ( `${ isInput ? "Input" : "Output" } Node Handle clicked:` , {
70- name : isInput ? input ?. name : output ? .name ,
72+ console . log ( `${ type } Node Handle clicked:` , {
73+ name : spec . name ,
7174 nodeId,
7275 handleId : nodeHandleId ,
7376 } ) ;
7477 }
75- } , [ isInput , input , output , nodeId , nodeHandleId ] ) ;
78+ } , [ spec , nodeId , nodeHandleId ] ) ;
7679
7780 useEffect ( ( ) => {
7881 if ( selected ) {
0 commit comments