minor fixes & mix node sample
This commit is contained in:
+2
-1
@@ -25,8 +25,9 @@ function parseRes(res: string): { width: number; height: number } {
|
||||
|
||||
// Converts a Vue Flow handle id to the NODE_CONFIG port key used in graph JSON
|
||||
function handleToPort(handle: string): string {
|
||||
return handle.replace(/-(?:in|out)$/, '_flow_id')
|
||||
return handle.replace(/-(?:in|out)(?:-\d+)?$/, '_flow_id')
|
||||
// 'video-out' → 'video_flow_id', 'audio-in' → 'audio_flow_id'
|
||||
// 'video-in-1' → 'video_flow_id', 'audio-in-2' → 'audio_flow_id'
|
||||
}
|
||||
|
||||
export function buildGraph(vfNodes: Node[], vfEdges: Edge[]): GraphJson {
|
||||
|
||||
Reference in New Issue
Block a user