UNPKG

@ant-design/graphs

Version:
12 lines (10 loc) 382 B
import type { Point, PolylineStyleProps } from '@antv/g6'; import { Polyline } from '@antv/g6'; export class IndentedEdge extends Polyline { getControlPoints(attributes: Required<PolylineStyleProps>): Point[] { const [sourcePoint, targetPoint] = this.getEndpoints(attributes, false); const [sx] = sourcePoint; const [, ty] = targetPoint; return [[sx, ty]]; } }