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

版本2.18.1 无法绑定键盘事件 #4382

Closed
rabbitao opened this issue Aug 6, 2024 · 3 comments
Closed

版本2.18.1 无法绑定键盘事件 #4382

rabbitao opened this issue Aug 6, 2024 · 3 comments

Comments

@rabbitao
Copy link

rabbitao commented Aug 6, 2024

Describe the bug

版本2.18.1 无法绑定键盘事件

Your Example Website or App

1

Steps to Reproduce the Bug or Issue

以下为错误1:
const graph = new Graph({...options})

graph.bindKey('ctrl', () => {}) // 此处报错: 类型“Graph”上不存在属性“bindKey”

以下为错误2:
const graph = new Graph({
keyboard: true // 此处报错 : 对象字面量只能指定已知属性,并且“keyboard”不在类型“Partial”中
})

Expected behavior

按照文档所示 https://x6.antv.vision/zh/docs/tutorial/basic/keyboard
预期应正确绑定键盘事件

Screenshots or Videos

No response

Platform

  • OS: [macOS, Windows]
  • Browser: [ Chrome]
  • Version: [2.18.1]

Additional context

No response

@rabbitao rabbitao closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2024
@rabbitao
Copy link
Author

rabbitao commented Aug 6, 2024

https://x6.antv.antgroup.com/tutorial/plugins/keyboard
由插件包提供此功能
文档过于混乱

@cmxbg
Copy link

cmxbg commented Nov 27, 2024

你好,这个问题有解决吗

@melissa-44
Copy link

试试按这个重新装依赖:
"@antv/x6": "latest",
"@antv/x6-plugin-clipboard": "latest",
"@antv/x6-plugin-history": "latest",
"@antv/x6-plugin-keyboard": "latest",
"@antv/x6-plugin-selection": "latest",
"@antv/x6-plugin-snapline": "latest",
"@antv/x6-plugin-stencil": "latest",
"@antv/x6-plugin-transform": "latest",
"insert-css": "latest",

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

3 participants