Skip to content

Overhaul node computeSize - use actual text width#962

Merged
webfiltered merged 9 commits intomasterfrom
fix-slot-length
Apr 24, 2025
Merged

Overhaul node computeSize - use actual text width#962
webfiltered merged 9 commits intomasterfrom
fix-slot-length

Conversation

@webfiltered
Copy link
Contributor

Node resize overhaul

  • Precisely calculates node minimum size
  • Prevents input & output overlap
  • Prevents (normal*) widgets from rendering text over the edge of nodes
  • Performance impact was sub-millisecond for normal usage in a 500-node graph

image

Minimum size for a few example node configurations

Widgets

  • Converts hard-coded draw render values to class static properties
  • Adds widget button draw function for left/right arrow widgets

* Exception: control_after_generate, as it is not a true input / widget. A check may be added later to handle this special case.

@webfiltered webfiltered changed the title Add precise widget size calculation Add precise node size calculation Apr 24, 2025
@webfiltered webfiltered changed the title Add precise node size calculation Overhaul node computeSize - use actual text width Apr 24, 2025
@webfiltered
Copy link
Contributor Author

Test failure is.. desirable! A group node that's now less insanely-huge; assuming due to widgets no longer stacking on outputs are now calculated.

@webfiltered webfiltered merged commit 080a8da into master Apr 24, 2025
3 of 4 checks passed
@webfiltered webfiltered deleted the fix-slot-length branch April 24, 2025 14:31
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.

1 participant