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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user