Refactor: Viewport Culling improvements (#5767)

## Summary

Reduce the number of DOM changes, but also restructure the logic to
create a clean point of separation for when we can make DragAndScale
reactive.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5767-Refactor-Viewport-Culling-improvements-2796d73d365081708f02cb8033aac9b1)
by [Unito](https://www.unito.io)
This commit is contained in:
Alexander Brown
2025-09-25 11:23:15 -07:00
committed by GitHub
parent 13ce23399c
commit 97542efc9b
5 changed files with 156 additions and 233 deletions

View File

@@ -165,7 +165,7 @@ const { shouldRenderVueNodes } = useVueFeatureFlags()
// Vue node system
const vueNodeLifecycle = useVueNodeLifecycle()
const viewportCulling = useViewportCulling()
const { handleTransformUpdate } = useViewportCulling()
const handleVueNodeLifecycleReset = async () => {
if (shouldRenderVueNodes.value) {
@@ -187,8 +187,9 @@ watch(
}
)
const allNodes = viewportCulling.allNodes
const handleTransformUpdate = viewportCulling.handleTransformUpdate
const allNodes = computed(() =>
Array.from(vueNodeLifecycle.vueNodeData.value.values())
)
watchEffect(() => {
nodeDefStore.showDeprecated = settingStore.get('Comfy.Node.ShowDeprecated')