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

isHide 有办法支持 仅隐藏节点本身,相关边不受到影响 吗? #332

Closed
xuanergg opened this issue Jul 3, 2024 · 2 comments

Comments

@xuanergg
Copy link

xuanergg commented Jul 3, 2024

Existing Component

Component Name
ishide
是否隐藏这个节点,隐藏节点的同时,子节点也会被隐藏

Description
仅隐藏节点本身,相关边不受到影响

@xuanergg xuanergg changed the title [Feature Request] isHide 有办法支持 仅隐藏节点本身,相关边不受到影响 吗? isHide 有办法支持 仅隐藏节点本身,相关边不受到影响 吗? Jul 4, 2024
@Halecoder
Copy link

你可以试试更改透明度?

@seeksdream
Copy link
Owner

你可以试着修改节点的透明度。但节点依然是可以被点击的,可被选中的。
如果你介意被点击,你可以为节点设置className(比如node.className = 'my-hide'),然后通过样式穿透设置:

.my-hide {
    pointer-events: none;
}

这样,节点就变得不可见,也不可被点击了。

希望能解决你的问题。

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