GGEditor
GGEditor copied to clipboard
怎么去除连线的箭头
怎么去除连线的箭头
自定义边线的时候,可以能过配置 startArrow
或 endArrow
实现 :)
import React from "react";
import { RegisterEdge } from "gg-editor";
class CustomEdge extends React.Component {
render() {
const config = {
getStyle(item) {
const model = item.getModel();
const { color, size } = model;
return {
stroke: color || "#A3B1BF",
lineWidth: size || 5,
startArrow: false,
endArrow: false,
};
}
};
return (
<RegisterEdge name="custom-edge" config={config} extend={"flow-smooth"} />
);
}
}
export default CustomEdge;
线自定义好了,怎么应用到画布?谢谢
可以查看这篇归档