UNPKG

@ant-design/pro-flow

Version:
33 lines 1.11 kB
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { BaseEdge, getSmoothStepPath } from 'reactflow'; import { jsx as _jsx } from "react/jsx-runtime"; import { Fragment as _Fragment } from "react/jsx-runtime"; export default function RadiusEdge(_ref) { var sourceX = _ref.sourceX, sourceY = _ref.sourceY, targetX = _ref.targetX, targetY = _ref.targetY, sourcePosition = _ref.sourcePosition, targetPosition = _ref.targetPosition, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, markerEnd = _ref.markerEnd; var _getSmoothStepPath = getSmoothStepPath({ sourceX: sourceX, sourceY: sourceY, sourcePosition: sourcePosition, targetX: targetX, targetY: targetY, targetPosition: targetPosition, borderRadius: 50 }), _getSmoothStepPath2 = _slicedToArray(_getSmoothStepPath, 1), edgePath = _getSmoothStepPath2[0]; return /*#__PURE__*/_jsx(_Fragment, { children: /*#__PURE__*/_jsx(BaseEdge, { path: edgePath, markerEnd: markerEnd, style: style }) }); }