feat: enhance canvas styling and edge handling with glow effects
- Added custom CSS variables for edge stroke and connection line styles in light and dark modes to improve visual consistency. - Updated edge rendering logic to utilize new styles, enhancing the appearance of temporary edges during interactions. - Introduced a new utility function for applying glow effects based on source node types, improving the visual feedback of connections. - Refactored edge mapping to support glow effects, enhancing user experience during node interactions.
This commit is contained in:
@@ -145,6 +145,23 @@
|
||||
}
|
||||
|
||||
@layer components {
|
||||
/* Kanten: doppelte Standard-Dicke, feste Kontrastfarben je Light/Dark (gleiches Schema wie colorMode) */
|
||||
.react-flow {
|
||||
--xy-edge-stroke: rgba(44, 62, 80, 1);
|
||||
--xy-edge-stroke-width: 2;
|
||||
--xy-edge-stroke-selected: rgba(44, 62, 80, 1);
|
||||
--xy-connectionline-stroke: rgba(44, 62, 80, 1);
|
||||
--xy-connectionline-stroke-width: 1;
|
||||
}
|
||||
|
||||
.react-flow.dark {
|
||||
--xy-edge-stroke: rgba(189, 195, 199, 1);
|
||||
--xy-edge-stroke-width: 2;
|
||||
--xy-edge-stroke-selected: rgba(189, 195, 199, 1);
|
||||
--xy-connectionline-stroke: rgba(189, 195, 199, 1);
|
||||
--xy-connectionline-stroke-width: 1;
|
||||
}
|
||||
|
||||
/* Verbindungs-Punkte über Node-Inhalt (XYFlow setzt kein z-index) */
|
||||
.react-flow__handle {
|
||||
z-index: 50;
|
||||
@@ -156,9 +173,16 @@
|
||||
}
|
||||
|
||||
.react-flow__edge.temp .react-flow__edge-path {
|
||||
stroke: hsl(var(--foreground) / 0.3);
|
||||
stroke-width: 2.5;
|
||||
stroke-width: 5;
|
||||
stroke-dasharray: 8 6;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.react-flow:not(.dark) .react-flow__edge.temp .react-flow__edge-path {
|
||||
stroke: rgba(44, 62, 80, 0.35);
|
||||
}
|
||||
|
||||
.react-flow.dark .react-flow__edge.temp .react-flow__edge-path {
|
||||
stroke: rgba(189, 195, 199, 0.35);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user