@hubary/custom-jsplumb

对jsplumb v2.15.6进行自定义调整以实现业务需求

Usage no npm install needed!

<script type="module">
  import hubaryCustomJsplumb from 'https://cdn.skypack.dev/@hubary/custom-jsplumb';
</script>

README

custom-jsplumb

对src/connectors-flowchart.js进行修改,添加了customEndHeightConvert方法,修改了addSegment ,用于解决如图所示问题

  • custom before custom before

  • custom after custom after

# 相关配置
{
  anchor: ["Bottom", "Top"],
  connector: [
    "Flowchart",
    {
      alwaysRespectStubs: false,
      stub: 20,
      customEnd: true,
      customEndHeight: 20,
    },
  ],
  endpoint: "Blank",
  paintStyle: { stroke: "#999", strokeWidth: 2 },
  overlays: [["Arrow", { width: 8, length: 8, location: 1 }]],
};