mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 02:02:08 +00:00
@@ -174,8 +174,9 @@ export interface LGraphNode {
|
|||||||
// #endregion Types
|
// #endregion Types
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base Class for all the node type classes
|
* Base class for all nodes
|
||||||
* @param {string} name a name for the node
|
* @param title a name for the node
|
||||||
|
* @param type a type for the node
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
||||||
export class LGraphNode implements Positionable, IPinnable, IColorable {
|
export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||||
|
|||||||
@@ -58,7 +58,11 @@ export interface Parent<TChild> {
|
|||||||
*/
|
*/
|
||||||
export interface Positionable extends Parent<Positionable>, HasBoundingRect {
|
export interface Positionable extends Parent<Positionable>, HasBoundingRect {
|
||||||
readonly id: NodeId | RerouteId | number
|
readonly id: NodeId | RerouteId | number
|
||||||
/** Position in graph coordinates. Default: 0,0 */
|
/**
|
||||||
|
* Position in graph coordinates. This may be the top-left corner,
|
||||||
|
* the centre, or another point depending on concrete type.
|
||||||
|
* @default 0,0
|
||||||
|
*/
|
||||||
readonly pos: Point
|
readonly pos: Point
|
||||||
/** true if this object is part of the selection, otherwise false. */
|
/** true if this object is part of the selection, otherwise false. */
|
||||||
selected?: boolean
|
selected?: boolean
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ export interface LinkReleaseContextExtended {
|
|||||||
|
|
||||||
export interface LiteGraphCanvasEvent extends CustomEvent<CanvasEventDetail> {}
|
export interface LiteGraphCanvasEvent extends CustomEvent<CanvasEventDetail> {}
|
||||||
|
|
||||||
/** https://github.com/jagenjo/litegraph.js/blob/master/guides/README.md#lgraphnode */
|
|
||||||
|
|
||||||
export interface LGraphNodeConstructor<T extends LGraphNode = LGraphNode> {
|
export interface LGraphNodeConstructor<T extends LGraphNode = LGraphNode> {
|
||||||
|
new (title: string, type?: string): T
|
||||||
|
|
||||||
title: string
|
title: string
|
||||||
type: string
|
type: string
|
||||||
size?: Size
|
size?: Size
|
||||||
@@ -82,7 +82,6 @@ export interface LGraphNodeConstructor<T extends LGraphNode = LGraphNode> {
|
|||||||
title_text_color?: string
|
title_text_color?: string
|
||||||
keepAllLinksOnBypass: boolean
|
keepAllLinksOnBypass: boolean
|
||||||
nodeData: any
|
nodeData: any
|
||||||
new (): T
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// End backwards compat
|
// End backwards compat
|
||||||
|
|||||||
Reference in New Issue
Block a user