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

dnd拖拽时,希望支持触发监听的画布事件 #4184

Closed
csgajcr opened this issue Jan 25, 2024 · 3 comments
Closed

dnd拖拽时,希望支持触发监听的画布事件 #4184

csgajcr opened this issue Jan 25, 2024 · 3 comments

Comments

@csgajcr
Copy link

csgajcr commented Jan 25, 2024

功能描述

想实现一个功能,dnd拖入的节点,拖到连线上时,自动添加到该连线上。
但目前通过 plugin-dnd 拖入节点时,画布接受不到任何事件,导致此功能无法实现。
看了 dnd 的源码,发现 dnd 在 body 新建一个层,里面放了一个虚拟画布,在里面实现的逻辑。

期望解决方案

  1. 当前版本是否有其他曲线的方式能够实现上述效果
  2. 希望未来 dnd 能支持选项是否触发画布事件
@x6-bot
Copy link
Contributor

x6-bot bot commented Jan 25, 2024

👋 @csgajcr

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@csgajcr
Copy link
Author

csgajcr commented Jan 26, 2024

问题已解决,覆盖组件原有样式即可。

.x6-widget-dnd {
  pointer-events: none!important;

  &.dragging {
    display: inline-block;
  }

  &.dragging * {
    pointer-events: none !important;
  }
}

@csgajcr csgajcr closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
@zhangxilong-43
Copy link

请问下,覆盖组件原有样式是怎么解决自动添加到连线上这个问题的?

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

No branches or pull requests

2 participants