Add litegraph:group-double-click event (#109)

This commit is contained in:
Chenlei Hu
2024-09-02 17:44:19 -04:00
committed by GitHub
parent a93a1e1a21
commit 48c669626b
2 changed files with 35 additions and 8 deletions

16
public/litegraph.d.ts vendored
View File

@@ -166,12 +166,19 @@ export type LinkReleaseContextExtended = {
links: ConnectingLink[];
};
export type LiteGraphCanvasEventType = "empty-release" | "empty-double-click";
export type LiteGraphCanvasEventType = "empty-release" | "empty-double-click" | "group-double-click";
export type LiteGraphCanvasEvent = CustomEvent<{
subType: string;
originalEvent: Event,
originalEvent: Event;
linkReleaseContext?: LinkReleaseContextExtended;
group?: LGraphGroup;
}>;
export type LiteGraphCanvasGroupEvent = CustomEvent<{
subType: "group-double-click";
originalEvent: MouseEvent;
group: LGraphGroup;
}>;
export const LiteGraph: {
@@ -1121,6 +1128,11 @@ export declare class LGraphGroup {
private _bounding: Vector4;
color: string;
font: string;
size: Vector2;
pos: Vector2;
font_size: number;
get titleHeight(): number;
configure(o: SerializedLGraphGroup): void;
serialize(): SerializedLGraphGroup;