Skip to content

Commit

Permalink
add: Mark never node as translucent
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed May 21, 2024
1 parent 6feea9b commit 012f2d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@litegraph-ts/core",
"version": "0.2.2",
"version": "0.2.3",
"description": "A graph node editor similar to PD or UDK Blueprints. It works in an HTML5 Canvas and allows to export graphs to be included in applications.",
"source": "src/index.ts",
"types": "src/index.ts",
Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/LGraphCanvas_Rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
NODE_MODE_NAMES,
NODE_MODE_COLORS,
LinkRenderMode,
NodeMode,
} from "./types";
import type { Vector2 } from "./types";
import { getLitegraphTypeName } from "./utils";
Expand Down Expand Up @@ -946,6 +947,13 @@ export default class LGraphCanvas_Rendering {
}

var editor_alpha = this.editor_alpha;
if (node.mode === NodeMode.NEVER) {
editor_alpha = 0.4;
}
if (node.mode === NodeMode.ON_REQUEST) {
bgColor = "#FF00FF";
editor_alpha = 0.2;
}
ctx.globalAlpha = editor_alpha;

if (this.render_shadows && !low_quality) {
Expand Down

0 comments on commit 012f2d1

Please sign in to comment.