Skip to content

Commit a7665ad

Browse files
committed
wip: Try removing the events/culling
1 parent 0a80a28 commit a7665ad

File tree

6 files changed

+2
-629
lines changed

6 files changed

+2
-629
lines changed

packages/design-system/src/css/style.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,15 +1153,6 @@ audio.comfy-audio.empty-audio-widget {
11531153
font-size 0.1s ease;
11541154
}
11551155

1156-
/* Performance optimization during canvas interaction */
1157-
.transform-pane--interacting .lg-node * {
1158-
transition: none !important;
1159-
}
1160-
1161-
.transform-pane--interacting .lg-node {
1162-
will-change: transform;
1163-
}
1164-
11651156
/* START LOD specific styles */
11661157
/* LOD styles - Custom CSS avoids 100+ Tailwind selectors that would slow style recalculation when .isLOD toggles */
11671158

src/components/graph/GraphCanvas.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<TransformPane
5454
v-if="shouldRenderVueNodes && comfyApp.canvas && comfyAppReady"
5555
:canvas="comfyApp.canvas"
56-
@transform-update="handleTransformUpdate"
5756
@wheel.capture="canvasInteractions.forwardEventToCanvas"
5857
>
5958
<!-- Vue nodes rendered based on graph nodes -->
@@ -114,7 +113,6 @@ import TopbarBadges from '@/components/topbar/TopbarBadges.vue'
114113
import WorkflowTabs from '@/components/topbar/WorkflowTabs.vue'
115114
import { useChainCallback } from '@/composables/functional/useChainCallback'
116115
import type { VueNodeData } from '@/composables/graph/useGraphNodeManager'
117-
import { useViewportCulling } from '@/composables/graph/useViewportCulling'
118116
import { useVueNodeLifecycle } from '@/composables/graph/useVueNodeLifecycle'
119117
import { useNodeBadge } from '@/composables/node/useNodeBadge'
120118
import { useCanvasDrop } from '@/composables/useCanvasDrop'
@@ -196,7 +194,6 @@ const { shouldRenderVueNodes } = useVueFeatureFlags()
196194
197195
// Vue node system
198196
const vueNodeLifecycle = useVueNodeLifecycle()
199-
const { handleTransformUpdate } = useViewportCulling()
200197
201198
const handleVueNodeLifecycleReset = async () => {
202199
if (shouldRenderVueNodes.value) {

src/composables/graph/useViewportCulling.ts

Lines changed: 0 additions & 103 deletions
This file was deleted.

src/renderer/core/layout/__tests__/TransformPane.test.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,6 @@ describe('TransformPane', () => {
121121
const transformState = useTransformState()
122122
expect(transformState.syncWithCanvas).toHaveBeenCalledWith(mockCanvas)
123123
})
124-
125-
it('should emit transform update timing', async () => {
126-
const mockCanvas = createMockCanvas()
127-
const wrapper = mount(TransformPane, {
128-
props: {
129-
canvas: mockCanvas
130-
}
131-
})
132-
133-
await nextTick()
134-
135-
// Allow RAF to execute
136-
vi.advanceTimersToNextFrame()
137-
138-
expect(wrapper.emitted('transformUpdate')).toBeTruthy()
139-
})
140124
})
141125

142126
describe('canvas event listeners', () => {
@@ -220,9 +204,7 @@ describe('TransformPane', () => {
220204
const transformPane = wrapper.find('[data-testid="transform-pane"]')
221205

222206
// Initially should not have interacting class
223-
expect(transformPane.classes()).not.toContain(
224-
'transform-pane--interacting'
225-
)
207+
expect(transformPane.classes()).not.toContain('will-change-transform')
226208
})
227209

228210
it('should handle pointer events for node delegation', async () => {

src/renderer/core/layout/transform/TransformPane.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:class="
55
cn(
66
'absolute inset-0 w-full h-full pointer-events-none',
7-
isInteracting ? 'transform-pane--interacting' : 'will-change-auto',
7+
isInteracting ? 'will-change-transform' : 'will-change-auto',
88
isLOD && 'isLOD'
99
)
1010
"
@@ -55,24 +55,13 @@ provide(TransformStateKey, {
5555
isNodeInViewport
5656
})
5757
58-
const emit = defineEmits<{
59-
transformUpdate: []
60-
}>()
61-
6258
useRafFn(
6359
() => {
6460
if (!props.canvas) {
6561
return
6662
}
6763
syncWithCanvas(props.canvas)
68-
emit('transformUpdate')
6964
},
7065
{ immediate: true }
7166
)
7267
</script>
73-
74-
<style scoped>
75-
.transform-pane--interacting {
76-
will-change: transform;
77-
}
78-
</style>

0 commit comments

Comments
 (0)