-
Notifications
You must be signed in to change notification settings - Fork 449
Add functionality to quickly disconnect moved input links #7459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
95119c4
f55395e
f0a0868
2c8e48f
4372c6b
3d520cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,4 @@ | ||||||||||||||||||||||||||||||||||||||||||
| import type { SlotLayout } from '@/renderer/core/layout/types' | ||||||||||||||||||||||||||||||||||||||||||
| import type { LGraph } from '@/lib/litegraph/src/LGraph' | ||||||||||||||||||||||||||||||||||||||||||
| import type { NodeId } from '@/lib/litegraph/src/LGraphNode' | ||||||||||||||||||||||||||||||||||||||||||
| import type { RerouteId } from '@/lib/litegraph/src/Reroute' | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -72,11 +73,20 @@ export class LinkConnectorAdapter { | |||||||||||||||||||||||||||||||||||||||||
| beginFromInput( | ||||||||||||||||||||||||||||||||||||||||||
| nodeId: NodeId, | ||||||||||||||||||||||||||||||||||||||||||
| inputIndex: number, | ||||||||||||||||||||||||||||||||||||||||||
| opts?: { moveExisting?: boolean; fromRerouteId?: RerouteId } | ||||||||||||||||||||||||||||||||||||||||||
| opts?: { | ||||||||||||||||||||||||||||||||||||||||||
| moveExisting?: boolean | ||||||||||||||||||||||||||||||||||||||||||
| fromRerouteId?: RerouteId | ||||||||||||||||||||||||||||||||||||||||||
| layout: SlotLayout | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
77
to
81
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type inconsistency: The type declares Apply this diff to correct the type: opts?: {
moveExisting?: boolean
fromRerouteId?: RerouteId
- layout: SlotLayout
+ layout?: SlotLayout
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Comment on lines
77
to
81
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Required before Optional
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| ): void { | ||||||||||||||||||||||||||||||||||||||||||
| const node = this.network.getNodeById(nodeId) | ||||||||||||||||||||||||||||||||||||||||||
| const input = node?.inputs?.[inputIndex] | ||||||||||||||||||||||||||||||||||||||||||
| if (!node || !input) return | ||||||||||||||||||||||||||||||||||||||||||
| if (opts?.layout) | ||||||||||||||||||||||||||||||||||||||||||
| input.pos = [ | ||||||||||||||||||||||||||||||||||||||||||
| opts.layout.position.x - node.pos[0], | ||||||||||||||||||||||||||||||||||||||||||
| opts.layout.position.y - node.pos[1] | ||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| const fromReroute = this.network.getReroute(opts?.fromRerouteId) | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.