Skip to content

Commit

Permalink
Fix NODE_DEFAULT_SHAPE (#389)
Browse files Browse the repository at this point in the history
* Fix NODE_DEFAULT_SHAPE

* update snapshot
  • Loading branch information
huchenlei authored Dec 24, 2024
1 parent c8796f8 commit 11ce8e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5145,7 +5145,7 @@ export class LGraphCanvas {
const low_quality = this.ds.scale < 0.5

const { collapsed } = node.flags
const shape = node._shape || node.constructor.shape || RenderShape.ROUND
const shape = node._shape || node.constructor.shape || LiteGraph.NODE_DEFAULT_SHAPE
const { title_mode } = node.constructor

const render_title = title_mode == TitleMode.TRANSPARENT_TITLE || title_mode == TitleMode.NO_TITLE
Expand Down
2 changes: 1 addition & 1 deletion src/LiteGraphGlobal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class LiteGraphGlobal {
NODE_DEFAULT_COLOR = "#333"
NODE_DEFAULT_BGCOLOR = "#353535"
NODE_DEFAULT_BOXCOLOR = "#666"
NODE_DEFAULT_SHAPE = "box"
NODE_DEFAULT_SHAPE = RenderShape.ROUND
NODE_BOX_OUTLINE_COLOR = "#FFF"
NODE_ERROR_COLOUR = "#E00"
DEFAULT_SHADOW_COLOR = "rgba(0,0,0,0.5)"
Expand Down
2 changes: 1 addition & 1 deletion test/__snapshots__/litegraph.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ LiteGraphGlobal {
"NODE_DEFAULT_BGCOLOR": "#353535",
"NODE_DEFAULT_BOXCOLOR": "#666",
"NODE_DEFAULT_COLOR": "#333",
"NODE_DEFAULT_SHAPE": "box",
"NODE_DEFAULT_SHAPE": 2,
"NODE_ERROR_COLOUR": "#E00",
"NODE_MIN_WIDTH": 50,
"NODE_MODES": [
Expand Down

0 comments on commit 11ce8e0

Please sign in to comment.