feat: enhance canvas connection handling with custom animation and edge management

- Added a custom connection line component with animation for improved visual feedback during node interactions.
- Implemented CSS animations for temporary connection lines, enhancing the user experience in the canvas.
- Refactored edge creation and removal logic to support optimistic updates, improving performance during node manipulations.
- Introduced a utility function to compute edge reconnections after node deletions, streamlining edge management.
This commit is contained in:
Matthias
2026-03-28 13:26:47 +01:00
parent e5f27d7d29
commit fb24205da0
5 changed files with 425 additions and 91 deletions

View File

@@ -138,6 +138,23 @@
}
}
/* Temporäre XYFlow-Verbindungslinie (custom connectionLineComponent) */
@keyframes ls-connection-dash-offset {
to {
stroke-dashoffset: -18;
}
}
.ls-connection-line-marching {
animation: ls-connection-dash-offset 0.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.ls-connection-line-marching {
animation: none;
}
}
@layer utilities {
.animate-shimmer {
animation: shimmer 1.5s ease-in-out infinite;