Skip to content

当我设置 disableEmptyLine: true 的时候,拖出一条不连接任何节点的线的时候,报错,并无法继续连线 canvas.ts?6fe6:1256 Uncaught TypeError: Cannot read properties of undefined (reading 'anchors') at Canvas.onMouseDown #339

@liyajie920112

Description

@liyajie920112

版本: 1.1.38 或者1.2.1

伪代码

mounted() {
  this.topology = new Topology("canvas-box", { disableEmptyLine: true });
}

复现步骤如下:

  1. 向画布上拖一个节点
  2. 点击画布空白处,一定不要让节点选中(重要)
  3. 拖出一条线,不要连接任何其他节点(重要),此时线会消失
  4. 查看控制台
  5. 错误出现
  6. 如下图
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions