feat: multi-line edge labels
Connection labels now accept line breaks. The label field in EdgeModal is a textarea (Enter inserts a newline) and the rendered edge label uses whitespace-pre-line so newlines display as multiple lines. Closes #183 ha-relevant: yes
This commit is contained in:
@@ -406,7 +406,7 @@ export function HomelableEdge({ id, source, target, sourceHandleId, targetHandle
|
||||
<EdgeLabelRenderer>
|
||||
{data?.label && (
|
||||
<div
|
||||
className="absolute pointer-events-none font-mono text-[10px] px-1.5 py-0.5 rounded"
|
||||
className="absolute pointer-events-none font-mono text-[10px] px-1.5 py-0.5 rounded whitespace-pre-line text-center"
|
||||
style={{
|
||||
transform: `translate(-50%, -50%) translate(${labelPosition.x}px, ${labelPosition.y}px)`,
|
||||
background: theme.colors.edgeLabelBackground,
|
||||
|
||||
Reference in New Issue
Block a user