Skip to content
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

Redesign invalid node indicator #358

Merged
merged 12 commits into from
Nov 29, 2024
Merged

Redesign invalid node indicator #358

merged 12 commits into from
Nov 29, 2024

Conversation

webfiltered
Copy link
Contributor

@webfiltered webfiltered commented Nov 28, 2024

Invalid node redesign

  • Uses node "type" as a fallback title
  • Removes headache-inducing hard-coded error colour

image

Configurable

Prefer orange?

LiteGraph.NODE_ERROR_COLOUR = "#d61"

image

Old indicator + title

LiteGraph.use_legacy_node_error_indicator = true

image

Continues to be highly visible on busy workflows, even fully zoomed out:

image

API

  • Renames drawSelectionBounding => strokeShape
  • Extends the API to include thickness & colour
  • Fixes scaling of padding with rounded corners:

image

@webfiltered webfiltered changed the title Invalid indicator Redesign of invalid node indicator Nov 28, 2024
@webfiltered webfiltered changed the title Redesign of invalid node indicator Redesign invalid node indicator Nov 28, 2024
Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase this PR and explain why the node corner renderering changes?
image

@webfiltered
Copy link
Contributor Author

webfiltered commented Nov 29, 2024

Rebase: Done

Corners: So that's due to what is now ab83046. The previous setting was to simply double the rounded edges, which was close enough for what it was used for before - 6px. Math was was only off by 2px.

When you go up to 16px padding from the edge, it starts to look weird - the rounded corner is still the same as it was. With the new method, you get perfect alignment:

image

Edit: Added a side-by-side comparison to the mention in the PR.

@huchenlei huchenlei merged commit 91077aa into master Nov 29, 2024
3 of 4 checks passed
@huchenlei huchenlei deleted the invalid-indicator branch November 29, 2024 21:26
@webfiltered webfiltered linked an issue Dec 15, 2024 that may be closed by this pull request
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.

[Feature Request]Missing Node Types
2 participants