GGEditor icon indicating copy to clipboard operation
GGEditor copied to clipboard

怎么去除连线的箭头

Open 0end1 opened this issue 5 years ago • 3 comments

怎么去除连线的箭头

0end1 avatar May 06 '19 09:05 0end1

自定义边线的时候,可以能过配置 startArrowendArrow 实现 :)

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;

gaoli avatar May 14 '19 01:05 gaoli

线自定义好了,怎么应用到画布?谢谢

houtianxi avatar Mar 18 '22 07:03 houtianxi

可以查看这篇归档

liushan-github avatar Jun 17 '22 02:06 liushan-github