-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How to avoid custom folding and trigger the node:click callback in the V5 example #6517
Comments
``<script setup> const style = document.createElement("style"); const COLORS = { class TreeNode extends Rect { get childrenData() { getLabelStyle(attributes) { getPriceStyle(attributes) { drawPriceShape(attributes, container) { getCurrencyStyle(attributes) { drawCurrencyShape(attributes, container) { getPercentStyle(attributes) { drawPercentShape(attributes, container) { getTriangleStyle(attributes) { drawTriangleShape(attributes, container) { getVariableStyle(attributes) { drawVariableShape(attributes, container) { getCollapseStyle(attributes) { drawCollapseShape(attributes, container) {
} getProcessBarStyle(attributes) { drawProcessBarShape(attributes, container) { getKeyStyle(attributes) { render(attributes = this.parsedAttributes, container) {
} register(ExtensionCategory.NODE, "tree-node", TreeNode); fetch("https://assets.antv.antgroup.com/g6/decision-tree.json")
}); |
参考 Quoting code 格式化你的代码 |
Describe the bug / 问题描述
https://g6.antv.antgroup.com/zh/examples/scene-case/default/#fund-flow
Reproduction link / 重现链接
https://g6.antv.antgroup.com/zh/examples/scene-case/default/#fund-flow
Steps to Reproduce the Bug or Issue / 重现步骤
https://g6.antv.antgroup.com/zh/examples/scene-case/default/#fund-flow
如上图添加node:click事件即可复现
G6 Version / G6 版本
🆕 5.x
Operating System / 操作系统
Windows
Browser / 浏览器
Chrome
Additional context / 补充说明
V5.x 实例
The text was updated successfully, but these errors were encountered: