feat(canvas): implement edge insertion reflow and enhance connection validation
- Introduced a new CSS transition for edge insertion reflowing to improve visual feedback during node adjustments. - Enhanced the connection validation logic to include options for optimistic edges, ensuring better handling of edge creation scenarios. - Updated the canvas connection drop menu to support additional templates and improved edge insertion handling. - Refactored edge insertion logic to accommodate local node position adjustments during reflow operations. - Added tests for new edge insertion features and connection validation improvements.
This commit is contained in:
@@ -248,9 +248,62 @@
|
||||
drop-shadow(0 0 9px rgba(39, 39, 42, 0.4));
|
||||
}
|
||||
|
||||
.react-flow.canvas-edge-insert-reflowing .react-flow__node {
|
||||
transition-property: transform;
|
||||
transition-duration: var(--ls-edge-insert-reflow-duration, 1297ms);
|
||||
transition-timing-function: linear(
|
||||
0 0%,
|
||||
0.2718 2.5%,
|
||||
0.6464 5%,
|
||||
1 7.5%,
|
||||
1.25 10%,
|
||||
1.3641 12.5%,
|
||||
1.3536 15%,
|
||||
1.2575 17.5%,
|
||||
1.125 20%,
|
||||
1 22.5%,
|
||||
0.9116 25%,
|
||||
0.8713 27.5%,
|
||||
0.875 30%,
|
||||
0.909 32.5%,
|
||||
0.9558 35%,
|
||||
1 37.5%,
|
||||
1.0313 40%,
|
||||
1.0455 42.5%,
|
||||
1.0442 45%,
|
||||
1.0322 47.5%,
|
||||
1.0156 50%,
|
||||
1 52.5%,
|
||||
0.989 55%,
|
||||
0.9839 57.5%,
|
||||
0.9844 60%,
|
||||
0.9886 62.5%,
|
||||
0.9945 65%,
|
||||
1 67.5%,
|
||||
1.0039 70%,
|
||||
1.0057 72.5%,
|
||||
1.0055 75%,
|
||||
1.004 77.5%,
|
||||
1.002 80%,
|
||||
1 82.5%,
|
||||
0.9986 85%,
|
||||
0.998 87.5%,
|
||||
0.998 90%,
|
||||
0.9986 92.5%,
|
||||
0.9993 95%,
|
||||
1 97.5%,
|
||||
1 100%
|
||||
);
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.react-flow.canvas-scissors-mode .react-flow__edge:not(.temp) .react-flow__edge-path {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.react-flow.canvas-edge-insert-reflowing .react-flow__node {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user