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

x6 运行报错view.sendToken is not a function #3459

Open
lynn9527 opened this issue Apr 1, 2023 · 2 comments
Open

x6 运行报错view.sendToken is not a function #3459

lynn9527 opened this issue Apr 1, 2023 · 2 comments
Labels
type: feature 新功能 Feature/enhancement requests

Comments

@lynn9527
Copy link

lynn9527 commented Apr 1, 2023

问题描述

官方示例https://codesandbox.io/s/y5lu69运行错误,本地也遇见相同错误,提示错误:"TypeError: view.sendToken is not a function",安装版本"@antv/x6": "^2.9.4",本地代码如下,

const edge = graph.getEdges();
edge.forEach(item => {
const view = graph.findViewByCell(item)
const token = Vector.create('circle', { r: 6, fill: 'green' });
view.sendToken(token.node, 1000)
});
跟踪发现EdgeView下并无sendToken

重现链接

https://codesandbox.io/s/y5lu69

重现步骤

1、进入页面就可以看见错误

预期行为

无错误提示,能正常工作

平台

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

屏幕截图或视频(可选)

error

本地调试发现EdgeView下边并无sendToken方法,什么情况?麻烦给与解答,谢谢

error2

补充说明(可选)

本地调试发现EdgeView下边并无sendToken方法,什么情况?麻烦给与解答,谢谢

@x6-bot
Copy link
Contributor

x6-bot bot commented Apr 1, 2023

👋 @lynn9527

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.

@Clarence5
Copy link

官方文档说是: edge.sendToken ,删除 ,后续会由 animation 插件提供。https://x6.antv.antgroup.com/tutorial/update

@NewByVector NewByVector added the type: feature 新功能 Feature/enhancement requests label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature 新功能 Feature/enhancement requests
Projects
None yet
Development

No branches or pull requests

3 participants