Fix space-bar pan while moving vue links

This commit is contained in:
Austin Mroz
2026-06-15 15:45:43 -07:00
committed by Benjamin Lu
parent 284a1afae6
commit 2c9025420e
2 changed files with 7 additions and 2 deletions

View File

@@ -3985,7 +3985,8 @@ export class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap>
if (this._previously_dragging_canvas === null) {
this._previously_dragging_canvas = this.dragging_canvas
}
this.dragging_canvas = this.pointer.isDown
this.dragging_canvas =
this.pointer.isDown || !!this.linkConnector.renderLinks.length
block_default = true
} else if (e.key === 'Escape') {
// esc

View File

@@ -23,6 +23,7 @@ import {
resolveNodeSurfaceSlotCandidate,
resolveSlotTargetCandidate
} from '@/renderer/core/canvas/links/linkDropOrchestrator'
import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
import { useSlotLinkDragUIState } from '@/renderer/core/canvas/links/slotLinkDragUIState'
import type { SlotDropCandidate } from '@/renderer/core/canvas/links/slotLinkDragUIState'
import { getSlotKey } from '@/renderer/core/layout/slots/slotIdentifier'
@@ -124,6 +125,7 @@ export function useSlotLinkInteraction({
setCompatibleForKey,
clearCompatible
} = useSlotLinkDragUIState()
const canvasStore = useCanvasStore()
const conversion = useSharedCanvasPositionConversion()
const pointerSession = createPointerSession()
let activeAdapter: LinkConnectorAdapter | null = null
@@ -419,9 +421,11 @@ export function useSlotLinkInteraction({
const canvas = app.canvas
const node = nodeId && canvas ? canvas.graph?.getNodeById(nodeId) : null
const handlePointerMove = (event: PointerEvent) => {
if (!pointerSession.matches(event)) return
if (!pointerSession.matches(event) || canvasStore.isReadOnly) return
event.stopPropagation()
app.canvas.last_mouse = [event.clientX, event.clientY]
autoPan?.updatePointer(event.clientX, event.clientY)
if (canvas?.subgraph && node) {