mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
[Refactor] Move shape fallback from LGraphCanvas to LGraphNode (#451)
* [Refactor] Move shape fallback from LGraphCanvas to LGraphNode * nit
This commit is contained in:
@@ -5175,7 +5175,7 @@ export class LGraphCanvas {
|
||||
const low_quality = this.low_quality
|
||||
|
||||
const { collapsed } = node.flags
|
||||
const shape = node._shape || node.constructor.shape || LiteGraph.NODE_DEFAULT_SHAPE
|
||||
const shape = node.renderingShape
|
||||
const title_mode = node.title_mode
|
||||
|
||||
const render_title = title_mode == TitleMode.TRANSPARENT_TITLE || title_mode == TitleMode.NO_TITLE
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user