You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.6 KiB
39 lines
1.6 KiB
import type { DisplayObjectConfig } from '@antv/g';
|
|
import type { Point } from '../../types';
|
|
import type { BaseEdgeStyleProps } from './base-edge';
|
|
import { Cubic } from './cubic';
|
|
/**
|
|
* <zh/> 垂直方向的三次贝塞尔曲线样式配置项
|
|
*
|
|
* <en/> Cubic Bezier curve style properties in vertical direction
|
|
*/
|
|
export interface CubicVerticalStyleProps extends BaseEdgeStyleProps {
|
|
/**
|
|
* <zh/> 控制点在两端点连线上的相对位置,范围为`0-1`
|
|
*
|
|
* <en/> The relative position of the control point on the line, ranging from `0-1`
|
|
* @defaultValue [0.5, 0.5]
|
|
*/
|
|
curvePosition?: number | [number, number];
|
|
/**
|
|
* <zh/> 控制点距离两端点连线的距离,可理解为控制边的弯曲程度
|
|
*
|
|
* <en/> The distance of the control point from the line
|
|
* @defaultValue [0, 0]
|
|
*/
|
|
curveOffset?: number | [number, number];
|
|
}
|
|
/**
|
|
* <zh/> 垂直方向的三次贝塞尔曲线
|
|
*
|
|
* <en/> Cubic Bezier curve in vertical direction
|
|
* @remarks
|
|
* <zh/> 特别注意,计算控制点时主要考虑 y 轴上的距离,忽略 x 轴的变化
|
|
*
|
|
* <en/> Please note that when calculating the control points, the distance on the y-axis is mainly considered, and the change on the x-axis is ignored
|
|
*/
|
|
export declare class CubicVertical extends Cubic {
|
|
static defaultStyleProps: Partial<CubicVerticalStyleProps>;
|
|
constructor(options: DisplayObjectConfig<CubicVerticalStyleProps>);
|
|
protected getControlPoints(sourcePoint: Point, targetPoint: Point, curvePosition: [number, number], curveOffset: [number, number]): [Point, Point];
|
|
}
|
|
|