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

请问可不可以像dom那样操作svg节点呢? #588

Open
w8w8w8 opened this issue Jan 21, 2021 · 4 comments
Open

请问可不可以像dom那样操作svg节点呢? #588

w8w8w8 opened this issue Jan 21, 2021 · 4 comments

Comments

@w8w8w8
Copy link

w8w8w8 commented Jan 21, 2021

希望能点击svg,获取到点击的节点ID,然后动态更新相关的节点文字颜色位置等操作!
请问能实现么?
谢谢

@w8w8w8 w8w8w8 changed the title 请问可不可以想dom那样操作svg节点呢? 请问可不可以像dom那样操作svg节点呢? Jan 21, 2021
@dntzhang
Copy link
Collaborator

可以通过 svg.children 拿到所有子节点进行操作
https://github.com/Tencent/omi/tree/master/packages/cax#%E7%BA%BF%E6%80%A7%E8%BF%90%E5%8A%A8

@w8w8w8
Copy link
Author

w8w8w8 commented Jan 25, 2021

@dntzhang thank you

@aliang888
Copy link

可以通过 svg.children 拿到所有子节点进行操作 https://github.com/Tencent/omi/tree/master/packages/cax#%E7%BA%BF%E6%80%A7%E8%BF%90%E5%8A%A8
链接打不开了

@Muna-Lombe
Copy link

Muna-Lombe commented May 2, 2022 via email

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

4 participants