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

Apply node opacity setting to all node colors #947

Merged
merged 9 commits into from
Sep 24, 2024
Merged

Conversation

christian-byrne
Copy link
Collaborator

Selection_419

Reverts colorPalette.ts/GraphCanvas.vue changes in #909. Moves opacity adjustment to drawNode patch:

const origDrawNode = LGraphCanvas.prototype.drawNode
LGraphCanvas.prototype.drawNode = function (node, ctx) {

Combines color lightening and opacity adjustment to single function and memoizes it. The cache does not grow large when adjusting opacity slider because the nodes' draw methods aren't called until the settings dialog closes.

@huchenlei huchenlei added the New Browser Test Expectations New browser test screenshot should be set by github action label Sep 24, 2024
@huchenlei huchenlei merged commit b21c0f5 into main Sep 24, 2024
2 checks passed
@huchenlei huchenlei deleted the node-color-adjust branch September 25, 2024 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Browser Test Expectations New browser test screenshot should be set by github action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants