feat(canvas): add shared glowing canvas handle

This commit is contained in:
2026-04-11 08:47:30 +02:00
parent 1d691999dd
commit ae76289e41
4 changed files with 322 additions and 0 deletions

View File

@@ -179,6 +179,27 @@ export function canvasHandleAccentRgb(args: {
return SOURCE_NODE_GLOW_RGB[nodeType] ?? CONNECTION_LINE_FALLBACK_RGB;
}
export function canvasHandleAccentColor(args: {
nodeType: string | undefined;
handleId?: string | null;
handleType: "source" | "target";
}): string {
const [r, g, b] = canvasHandleAccentRgb(args);
return `rgb(${r}, ${g}, ${b})`;
}
export function canvasHandleAccentColorWithAlpha(
args: {
nodeType: string | undefined;
handleId?: string | null;
handleType: "source" | "target";
},
alpha: number,
): string {
const [r, g, b] = canvasHandleAccentRgb(args);
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
}
/**
* RGB für die temporäre Verbindungslinie (Quell-Node + optional Handle, z. B. Reconnect).
*/