{ if (readonly) { return; } showEdgePanel = true; currentEdge = e.edge; }} onbeforeconnect={(edge: any) => normalizeEdgeBeforeConnect(edge)} ondelete={readonly ? undefined : onDelete} onclick={(e) => { if (readonly) { return; } const el = e.target as HTMLElement; if (el.classList.contains("svelte-flow__edge-interaction") || el.classList.contains('panel-content') || el.closest('.panel-content')){ return } showEdgePanel = false; currentEdge = null; }} defaultEdgeOptions={{ type: 'flow', markerEnd: { type: MarkerType.ArrowClosed, width: 20, height: 20 } }} >
{#if showEdgePanel}
边属性设置
边条件设置
{#if currentEdge?.data?.managedByConditionNode}
分支:{currentEdge?.data?.branchLabel || currentEdge?.data?.branchId || '-'}
该连线由条件节点托管,条件表达式不可在边面板手动修改。
{:else}
{ if (currentEdge){ updateEdgeData(currentEdge.id, { condition: (e.target as HTMLTextAreaElement)?.value || '' }) } }} /> {/if}
{ if (currentEdge?.id) { deleteEdge(currentEdge.id) } showEdgePanel = false; }} > 删除
{ showEdgePanel = false; }} > 保存
{/if}
{#if nodePickerVisible} {#if pendingConnectionLine}
{/if}
{/if} {#if !hideBottomDock}
{#each zoomOptions as opt}
{opt}%
{/each} {#if !zoomOptions.includes(currentZoomPercent)}
{currentZoomPercent}%
{/if}
{#if canvasLocked}
{:else}
{/if}
{#if onRunTest}
onRunTest?.()} aria-label="试运行" title="试运行" >
试运行
{/if}
{/if}