@ -6,7 +6,12 @@ import { WorkflowDiagramEdge } from '@/workflow/workflow-diagram/types/WorkflowD
|
|||||||
import { workflowInsertStepIdsComponentState } from '@/workflow/workflow-steps/states/workflowInsertStepIdsComponentState';
|
import { workflowInsertStepIdsComponentState } from '@/workflow/workflow-steps/states/workflowInsertStepIdsComponentState';
|
||||||
import { useTheme } from '@emotion/react';
|
import { useTheme } from '@emotion/react';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
import { BaseEdge, EdgeProps, getStraightPath } from '@xyflow/react';
|
import {
|
||||||
|
BaseEdge,
|
||||||
|
EdgeLabelRenderer,
|
||||||
|
EdgeProps,
|
||||||
|
getStraightPath,
|
||||||
|
} from '@xyflow/react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { IconPlus } from 'twenty-ui/display';
|
import { IconPlus } from 'twenty-ui/display';
|
||||||
import { IconButtonGroup } from 'twenty-ui/input';
|
import { IconButtonGroup } from 'twenty-ui/input';
|
||||||
@ -76,33 +81,35 @@ export const WorkflowDiagramFilteringDisabledEdgeEditable = ({
|
|||||||
style={{ stroke: theme.border.color.strong }}
|
style={{ stroke: theme.border.color.strong }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<StyledContainer
|
<EdgeLabelRenderer>
|
||||||
labelY={labelY}
|
<StyledContainer
|
||||||
data-click-outside-id={WORKFLOW_DIAGRAM_EDGE_OPTIONS_CLICK_OUTSIDE_ID}
|
labelY={labelY}
|
||||||
>
|
data-click-outside-id={WORKFLOW_DIAGRAM_EDGE_OPTIONS_CLICK_OUTSIDE_ID}
|
||||||
<StyledWrapper
|
|
||||||
onMouseEnter={() => setHovered(true)}
|
|
||||||
onMouseLeave={() => setHovered(false)}
|
|
||||||
>
|
>
|
||||||
<StyledHoverZone />
|
<StyledWrapper
|
||||||
{(hovered || isSelected) && (
|
onMouseEnter={() => setHovered(true)}
|
||||||
<StyledIconButtonGroup
|
onMouseLeave={() => setHovered(false)}
|
||||||
className="nodrag nopan"
|
>
|
||||||
iconButtons={[
|
<StyledHoverZone />
|
||||||
{
|
{(hovered || isSelected) && (
|
||||||
Icon: IconPlus,
|
<StyledIconButtonGroup
|
||||||
onClick: () => {
|
className="nodrag nopan"
|
||||||
startNodeCreation({
|
iconButtons={[
|
||||||
parentStepId: source,
|
{
|
||||||
nextStepId: target,
|
Icon: IconPlus,
|
||||||
});
|
onClick: () => {
|
||||||
|
startNodeCreation({
|
||||||
|
parentStepId: source,
|
||||||
|
nextStepId: target,
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
]}
|
||||||
]}
|
/>
|
||||||
/>
|
)}
|
||||||
)}
|
</StyledWrapper>
|
||||||
</StyledWrapper>
|
</StyledContainer>
|
||||||
</StyledContainer>
|
</EdgeLabelRenderer>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user