antvis/G6

请问继承现有图形,自定义节点后,点击节点时,如何获取数据的id? #6012

Aolef posted onGitHub

Describe the bug / 问题描述

扩展现有图形,自定义节点后,点击节点时,获取不到数据的id

No response

Steps to Reproduce the Bug or Issue / 重现步骤

建图 自定义节点

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


事件对象: event.target.id 元素中:this.id

posted by Aarebecca 10 months ago

第一张图里, event.target.id拿到的是空字符串,但是应该是有值的,是需要继承的时候做什么操作吗

posted by Aolef 10 months ago

Fund this Issue

$0.00
Funded

Pull requests