didi / didi/LogicFlow

[Bug Report]: history:change事件异常

Open
#1,687 2 comments 0 reactions 0 assignees View on GitHub
core: history status: need-repro type:bug
Dominant language
TypeScript
Stars
11.7k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

### 发生了什么?

![image](https://github.com/user-attachments/assets/f72a0b0a-df27-4298-9a3b-43846b7ae238)

问题:在当前版本下,从节点的锚点拉连接线时,无论拉出来的这根线有没有最终连接到节点上,都会触发history:change事件。期望是有效操作才会触发,比如连接线最终连接到了节点上

复现方法:新增一个节点,从锚点拉连接线出来后取消(不需要连接到其他节点),可以在history:change事件中监听到事件一直在触发,undos的长度会随着操作不停增长

### logicflow/core版本

1.2.27

### logicflow/extension版本

1.2.27

### logicflow/engine版本

_No response_

### 浏览器&环境

Chrome

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.