Skip to content

Conversation

dserri
Copy link

@dserri dserri commented Jul 23, 2025

This pull request introduces enhancements to the LiteGraph library, focusing on improving slot orientation flexibility and visual rendering of connections. The key updates include adding separate configuration options for input and output slot orientations, refining the logic for collapsed nodes, and introducing better visual alignment for connections.

Slot Orientation Enhancements:

  • Added inputs_horizontal and outputs_horizontal properties to allow independent horizontal orientation for input and output slots, overriding the general horizontal property (build/litegraph.core.js: [1] [2].

Rendering and Visual Improvements:

  • Updated logic to determine slot positions and connection directions based on the new inputs_horizontal and outputs_horizontal properties, improving support for collapsed nodes and ensuring consistent alignment (build/litegraph.core.js: [1] [2] [3].
  • Introduced a new feature to auto-detect and use straight lines for connections when nodes are reasonably aligned, enhancing visual clarity (build/litegraph.core.js: [1] [2].

Codebase Consistency:

  • Updated all relevant methods and rendering logic to use the new slot orientation properties, replacing references to the general horizontal property where applicable (build/litegraph.core.js: [1] [2] [3].

dserri added 2 commits July 23, 2025 17:49
- Updated the logic for determining input and output orientations to allow null values for inputs_horizontal and outputs_horizontal, providing a more flexible configuration.
- Adjusted multiple instances in the executeAction method to account for the new null checks, ensuring that the general horizontal property is used when specific orientations are not defined.
- Improved documentation comments to clarify the behavior of the new orientation settings.
@jagenjo
Copy link
Owner

jagenjo commented Jul 28, 2025

very promising, can you do the PR only changing the src/litegraph.js ?

@dserri
Copy link
Author

dserri commented Jul 29, 2025

@jagenjo i think i have to tinker the code a bit, i found out after some more testing that it is not working as intended. I will take time in the next week to fix the issue then do the PR as you said. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants