mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 14:39:58 +00:00
TypeDef updates and fix of method declaration
This commit is contained in:
5
src/litegraph.d.ts
vendored
5
src/litegraph.d.ts
vendored
@@ -16,6 +16,7 @@ export type SlotShape =
|
||||
| typeof LiteGraph.CIRCLE_SHAPE
|
||||
| typeof LiteGraph.ARROW_SHAPE
|
||||
| typeof LiteGraph.SQUARE_SHAPE
|
||||
| number; // For custom shapes
|
||||
|
||||
/** https://github.com/jagenjo/litegraph.js/tree/master/guides#node-slots */
|
||||
export interface INodeSlot {
|
||||
@@ -238,6 +239,8 @@ export const LiteGraph: {
|
||||
registerNodeType(type: string, base: { new (): LGraphNode }): void;
|
||||
/** removes a node type from the system */
|
||||
unregisterNodeType(type: string): void;
|
||||
/** Removes all previously registered node's types. */
|
||||
clearRegisteredTypes(): void;
|
||||
/**
|
||||
* Create a new node type by passing a function, it wraps it with a proper class and generates inputs according to the parameters of the function.
|
||||
* Useful to wrap simple methods that do not require properties, and that only process some input to generate an output.
|
||||
@@ -1308,6 +1311,8 @@ export declare class LGraphCanvas {
|
||||
drawBackCanvas(): void;
|
||||
/** draws the given node inside the canvas */
|
||||
drawNode(node: LGraphNode, ctx: CanvasRenderingContext2D): void;
|
||||
/** draws graphic for node's slot */
|
||||
drawSlotGraphic(ctx: CanvasRenderingContext2D, pos: number[], shape: SlotShape, horizontal: boolean): void;
|
||||
/** draws the shape of the given node in the canvas */
|
||||
drawNodeShape(
|
||||
node: LGraphNode,
|
||||
|
||||
Reference in New Issue
Block a user