mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 14:27:40 +00:00
@@ -174,8 +174,9 @@ export interface LGraphNode {
|
||||
// #endregion Types
|
||||
|
||||
/**
|
||||
* Base Class for all the node type classes
|
||||
* @param {string} name a name for the node
|
||||
* Base class for all nodes
|
||||
* @param title a name for the node
|
||||
* @param type a type for the node
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
||||
export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
|
||||
@@ -58,7 +58,11 @@ export interface Parent<TChild> {
|
||||
*/
|
||||
export interface Positionable extends Parent<Positionable>, HasBoundingRect {
|
||||
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
|
||||
/** true if this object is part of the selection, otherwise false. */
|
||||
selected?: boolean
|
||||
|
||||
@@ -64,9 +64,9 @@ export interface LinkReleaseContextExtended {
|
||||
|
||||
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> {
|
||||
new (title: string, type?: string): T
|
||||
|
||||
title: string
|
||||
type: string
|
||||
size?: Size
|
||||
@@ -82,7 +82,6 @@ export interface LGraphNodeConstructor<T extends LGraphNode = LGraphNode> {
|
||||
title_text_color?: string
|
||||
keepAllLinksOnBypass: boolean
|
||||
nodeData: any
|
||||
new (): T
|
||||
}
|
||||
|
||||
// End backwards compat
|
||||
|
||||
Reference in New Issue
Block a user