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

antV X6 启用剪切板功能不能复制标签文字内容 #4057

Open
szx-mzt opened this issue Nov 30, 2023 · 1 comment
Open

antV X6 启用剪切板功能不能复制标签文字内容 #4057

szx-mzt opened this issue Nov 30, 2023 · 1 comment

Comments

@szx-mzt
Copy link

szx-mzt commented Nov 30, 2023

问题描述

// copy cut paste
graph.bindKey(['meta+c', 'ctrl+c'], () => {
const cells = graph.getSelectedCells()
if (cells.length) {
graph.copy(cells)
}
return false
})
graph.bindKey(['meta+x', 'ctrl+x'], () => {
const cells = graph.getSelectedCells()
if (cells.length) {
graph.cut(cells)
}
return false
})
graph.bindKey(['meta+v', 'ctrl+v'], () => {
if (!graph.isClipboardEmpty()) {
const cells = graph.paste({ offset: 32 })
graph.cleanSelection()
graph.select(cells)
}
return false
})
绑定copy cut paste这些事件后,不能对标签或文本内容进行复制粘贴。

重现链接

https://x6.antv.vision/zh/examples/showcase/practices#flowchart

重现步骤

image
内容被选中复制粘贴会粘贴连线和对应节点

预期行为

期望节点文字内容选中后可以复制文字内容

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.11.1 ...]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Nov 30, 2023

👋 @szx-mzt

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.

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

1 participant