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.
 
 
 
 

21 lines
576 B

import { mergeOptions } from '../../utils/style';
import { BaseEdge } from './base-edge';
/**
* <zh/> 直线
*
* <en/> Line
*/
export class Line extends BaseEdge {
constructor(options) {
super(mergeOptions({ style: Line.defaultStyleProps }, options));
}
getKeyPath(attributes) {
const [sourcePoint, targetPoint] = this.getEndpoints(attributes);
return [
['M', sourcePoint[0], sourcePoint[1]],
['L', targetPoint[0], targetPoint[1]],
];
}
}
Line.defaultStyleProps = {};
//# sourceMappingURL=line.js.map