@@ -43,8 +43,6 @@ export const DFlowFunctionCard: React.FC<DFlowFunctionCardProps> = memo((props)
43
43
const dataTypeService = useService ( DFlowDataTypeReactiveService )
44
44
const definition = functionService . getFunctionDefinition ( data . function . function_id )
45
45
const validation = useFunctionValidation ( definition ! ! , data . parameters ! ! . map ( p => p . value ! ! ) , useService ( DFlowDataTypeReactiveService ) ! ! )
46
- //validation && console.log(definition, data.parameters!!.map(p => p.value!!), validation)
47
- // Greife auf alle aktuellen Edges im Flow zu:
48
46
const edges = useStore ( s => s . edges ) ;
49
47
50
48
// Helper, ob zu diesem Parameter eine Edge existiert:
@@ -136,29 +134,33 @@ export const DFlowFunctionCard: React.FC<DFlowFunctionCardProps> = memo((props)
136
134
</ div >
137
135
) : null }
138
136
137
+ { functionData . parameters ?. some ( param => isNodeFunctionObject ( param . value as NodeFunctionObject ) ) ? (
138
+ < CardSection >
139
+ { /* Dynamische Parameter-Eingänge (rechts), nur wenn wirklich verbunden */ }
140
+ { functionData . parameters ?. map ( ( param : NodeParameterObject , index : number ) => {
141
+
142
+
143
+ const parameter = definition ?. parameters ! ! . find ( p => p . parameter_id == param . definition . parameter_id )
144
+ const isNodeDataType = dataTypeService . getDataType ( parameter ! ! . type ) ?. type === EDataType . NODE ;
145
+
146
+
147
+ return isNodeFunctionObject ( param . value as NodeFunctionObject ) ? < Flex pos = { "relative" } >
148
+ { param . definition . parameter_id }
149
+ < Handle
150
+ key = { param . definition . parameter_id }
151
+ type = "target"
152
+ position = { Position . Right }
153
+ style = { { position : "absolute" , transform : isNodeDataType ? "translate(-50%, -50%)" : "translate(50%, -50%)" , top : "50%" , right : isNodeDataType ? "50%" : "0" } }
154
+ id = { `param-${ param . definition . parameter_id } ` }
155
+ isConnectable = { false }
156
+ hidden = { ! isParamConnected ( param . definition . parameter_id ) }
157
+ className = { "function-card__handle function-card__handle--target" }
158
+ />
159
+ </ Flex > : null
160
+ } ) }
161
+ </ CardSection >
162
+ ) : null }
139
163
140
- { /* Dynamische Parameter-Eingänge (rechts), nur wenn wirklich verbunden */ }
141
- { functionData . parameters ?. map ( ( param : NodeParameterObject , index : number ) => {
142
-
143
-
144
- const parameter = definition ?. parameters ! ! . find ( p => p . parameter_id == param . definition . parameter_id )
145
- const isNodeDataType = dataTypeService . getDataType ( parameter ! ! . type ) ?. type === EDataType . NODE ;
146
-
147
-
148
- return < Flex pos = { "relative" } >
149
- { param . definition . parameter_id }
150
- < Handle
151
- key = { param . definition . parameter_id }
152
- type = "target"
153
- position = { Position . Right }
154
- style = { { position : "absolute" , transform : isNodeDataType ? "translate(-50%, -50%)" : "translate(50%, -50%)" , top : "50%" , right : isNodeDataType ? "50%" : "0" } }
155
- id = { `param-${ param . definition . parameter_id } ` }
156
- isConnectable = { false }
157
- hidden = { ! isParamConnected ( param . definition . parameter_id ) }
158
- className = { "function-card__handle function-card__handle--target" }
159
- />
160
- </ Flex >
161
- } ) }
162
164
163
165
{ /* Ausgang */ }
164
166
< Handle
0 commit comments