Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix the conflict issue of hover-element and drag-element #5762

Merged
merged 3 commits into from
May 23, 2024

Conversation

yvonneyx
Copy link
Contributor

  • 修复 hover-elementdrag-element 交互共用时冲突问题
  • 新增脚本 npm run doc:dev 支持本地生成api文档(由于 reference 文件过多,dumi启动慢,本地先删除 reference)

@yvonneyx yvonneyx changed the title Fix/behavior collision fix: fix the conflict issue of hover-element and drag-element May 22, 2024

const canvas = this.context.canvas.document;
canvas.addEventListener(`${CommonEvent.DRAG_START}`, this.toggleFrozen);
canvas.addEventListener(`${CommonEvent.DRAG_END}`, this.toggleFrozen);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个小问题,根据事件参数来设置 flag 会比 toggle 更稳定些,一些极端情况下这两个事件可能并不会成对触发

@yvonneyx yvonneyx merged commit ac0490f into v5 May 23, 2024
3 of 5 checks passed
@yvonneyx yvonneyx deleted the fix/behavior-collision branch May 23, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants