Fix workflow diagram success edges (#12439)
## Before <img width="492" alt="image" src="https://github.com/user-attachments/assets/6c85baea-3b58-4196-87ab-dcc7bcb4e5ca" /> ## After <img width="477" alt="image" src="https://github.com/user-attachments/assets/0428f1f0-ef73-4fa1-b778-d1536a8b84e6" />
This commit is contained in:
@ -8,6 +8,7 @@ import {
|
|||||||
getStraightPath,
|
getStraightPath,
|
||||||
} from '@xyflow/react';
|
} from '@xyflow/react';
|
||||||
import { Label } from 'twenty-ui/display';
|
import { Label } from 'twenty-ui/display';
|
||||||
|
import { CREATE_STEP_NODE_WIDTH } from '@/workflow/workflow-diagram/constants/CreateStepNodeWidth';
|
||||||
|
|
||||||
const StyledLabel = styled(Label)`
|
const StyledLabel = styled(Label)`
|
||||||
color: ${({ theme }) => theme.tag.text.turquoise};
|
color: ${({ theme }) => theme.tag.text.turquoise};
|
||||||
@ -16,9 +17,7 @@ const StyledLabel = styled(Label)`
|
|||||||
type WorkflowDiagramSuccessEdgeProps = EdgeProps;
|
type WorkflowDiagramSuccessEdgeProps = EdgeProps;
|
||||||
|
|
||||||
export const WorkflowDiagramSuccessEdge = ({
|
export const WorkflowDiagramSuccessEdge = ({
|
||||||
sourceX,
|
|
||||||
sourceY,
|
sourceY,
|
||||||
targetX,
|
|
||||||
targetY,
|
targetY,
|
||||||
markerStart,
|
markerStart,
|
||||||
markerEnd,
|
markerEnd,
|
||||||
@ -27,9 +26,9 @@ export const WorkflowDiagramSuccessEdge = ({
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
const [edgePath, labelX, labelY] = getStraightPath({
|
const [edgePath, labelX, labelY] = getStraightPath({
|
||||||
sourceX,
|
sourceX: CREATE_STEP_NODE_WIDTH,
|
||||||
sourceY,
|
sourceY,
|
||||||
targetX,
|
targetX: CREATE_STEP_NODE_WIDTH,
|
||||||
targetY,
|
targetY,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user