File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed
renderer/extensions/vueNodes/components Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 3636 v-if =" shouldRenderVueNodes && comfyApp.canvas && comfyAppReady"
3737 :canvas =" comfyApp.canvas"
3838 @transform-update =" handleTransformUpdate"
39- @wheel.capture =" canvasInteractions.forwardEventToCanvas "
39+ @wheel.capture =" handleTransformPaneWheel "
4040 >
4141 <!-- Vue nodes rendered based on graph nodes -->
4242 <VueGraphNode
@@ -369,6 +369,18 @@ useCanvasDrop(canvasRef)
369369useLitegraphSettings ()
370370useNodeBadge ()
371371
372+ const handleTransformPaneWheel = (event : WheelEvent ) => {
373+ // Check if the wheel event is from an element that wants to capture wheel events
374+ const target = event .target as HTMLElement
375+ const captureElement = target ?.closest (' [data-capture-wheel="true"]' )
376+
377+ if (captureElement ) {
378+ return
379+ }
380+
381+ canvasInteractions .forwardEventToCanvas (event )
382+ }
383+
372384onMounted (async () => {
373385 useGlobalLitegraph ()
374386 useContextMenuTranslation ()
Original file line number Diff line number Diff line change 3939 dragStyle
4040 ]"
4141 v-bind =" pointerHandlers"
42- @wheel =" handleWheel "
42+ @wheel =" handleNodeWheel "
4343 @contextmenu =" handleContextMenu"
4444 >
4545 <div class =" flex items-center" >
@@ -320,6 +320,19 @@ const handleHeaderTitleUpdate = (newTitle: string) => {
320320 handleNodeTitleUpdate (nodeData .id , newTitle )
321321}
322322
323+ const handleNodeWheel = (event : WheelEvent ) => {
324+ // Check if the wheel event is from an element that wants to capture wheel events
325+ const target = event .target as HTMLElement
326+ const captureElement = target ?.closest (' [data-capture-wheel="true"]' )
327+
328+ if (captureElement ) {
329+ // Element wants to capture wheel events, don't forward to canvas
330+ return
331+ }
332+
333+ handleWheel (event )
334+ }
335+
323336const handleEnterSubgraph = () => {
324337 const graph = app .graph ?.rootGraph || app .graph
325338 if (! graph ) {
You can’t perform that action at this time.
0 commit comments