Appearance
隐藏
🌐 Hidden
你可以通过将节点的 hidden 属性设置为 true 或 false 来切换节点的可见性。
🌐 You can toggle the visibility of nodes by simply setting their hidden attribute to either true or false.
连接到隐藏节点的边也将被隐藏。
🌐 Edges that are connected to a hidden node will also be hidden.
如果将 onlyRenderVisibleElements 属性设置为 true,只有在当前视图范围内可见的元素才会被渲染。默认情况下,此行为是禁用的,这意味着无论元素是否在视图内,所有元素都会被渲染。
🌐 If you set the onlyRenderVisibleElements prop to true, only elements that are visible inside the current viewpane will be rendered. This behavior is disabled by default, meaning all elements are rendered whether they are inside the view or not.
这可以在初始渲染时为你节省一些时间,但请考虑移动面板可能会导致节点多次渲染到 DOM 中,这可能会根据需要挂载的组件的复杂性引起性能峰值。
🌐 This can save you some time on initial renders but consider that moving the pane can cause multiple renders of nodes into the dom, which can cause performance spikes depending on the complexity of the components that have to be mounted.