[Refactor] Move shape fallback from LGraphCanvas to LGraphNode (#451)

* [Refactor] Move shape fallback from LGraphCanvas to LGraphNode

* nit
This commit is contained in:
Chenlei Hu
2025-02-03 20:02:42 -08:00
committed by GitHub
parent 610ebd6ffe
commit 6cf1f2d627
2 changed files with 8 additions and 1 deletions

View File

@@ -323,6 +323,13 @@ export class LGraphNode implements Positionable, IPinnable {
}
}
/**
* The shape of the node used for rendering. @see {@link RenderShape}
*/
get renderingShape(): RenderShape {
return this._shape || this.constructor.shape || LiteGraph.NODE_DEFAULT_SHAPE
}
public get is_selected(): boolean {
return this.selected
}