|
@@ -126,13 +126,22 @@ export function WorkflowNode({ data, selected }: NodeProps) {
|
|
|
style={getStatusStyle()}
|
|
style={getStatusStyle()}
|
|
|
>
|
|
>
|
|
|
{/* Input handles at top (not for triggers). A node that names more than
|
|
{/* Input handles at top (not for triggers). A node that names more than
|
|
|
- one input gets a handle each, spread the way outputs are. */}
|
|
|
|
|
|
|
+ one input gets a handle each, spread the way outputs are.
|
|
|
|
|
+
|
|
|
|
|
+ Every data handle carries its name as an id, even when there is only
|
|
|
|
|
+ one of them. It used to be left undefined in the single-input case,
|
|
|
|
|
+ which worked while that was a node's only target handle: an edge
|
|
|
|
|
+ stored as targetInput "data" had nowhere else to land. Adding the
|
|
|
|
|
+ config handle on the left made that ambiguous - two target handles,
|
|
|
|
|
+ one of them anonymous - and on reload the stored "data" matched
|
|
|
|
|
+ neither, so the edge was silently dropped and the save wrote the
|
|
|
|
|
+ workflow back without it. */}
|
|
|
{!isTrigger && !isConfigurator && inputs.map((input, idx) => (
|
|
{!isTrigger && !isConfigurator && inputs.map((input, idx) => (
|
|
|
<Handle
|
|
<Handle
|
|
|
key={input.name}
|
|
key={input.name}
|
|
|
type="target"
|
|
type="target"
|
|
|
position={Position.Top}
|
|
position={Position.Top}
|
|
|
- id={inputs.length > 1 ? input.name : undefined}
|
|
|
|
|
|
|
+ id={input.name}
|
|
|
className="!w-3 !h-3 !bg-gray-400 dark:!bg-gray-500 !border-2 !border-white dark:!border-slate-800"
|
|
className="!w-3 !h-3 !bg-gray-400 dark:!bg-gray-500 !border-2 !border-white dark:!border-slate-800"
|
|
|
style={inputs.length > 1 ? { left: `${calculateHandlePosition(idx, inputs.length)}%` } : undefined}
|
|
style={inputs.length > 1 ? { left: `${calculateHandlePosition(idx, inputs.length)}%` } : undefined}
|
|
|
/>
|
|
/>
|