fix: Update node.getBounding box to support collapsed nodes and shadows

This commit is contained in:
Michael Poutre
2023-07-28 20:22:12 -07:00
parent 23c300b7ac
commit beee147000
2 changed files with 32 additions and 10 deletions

7
src/litegraph.d.ts vendored
View File

@@ -825,9 +825,12 @@ export declare class LGraphNode {
/**
* returns the bounding of the object, used for rendering purposes
* @return [x, y, width, height]
* @method getBounding
* @param out [optional] a place to store the output, to free garbage
* @param compute_outer [optional] set to true to include the shadow and connection points in the bounding calculation
* @return the bounding box in format of [topleft_cornerx, topleft_cornery, width, height]
*/
getBounding(): Vector4;
getBounding(out?: Vector4, compute_outer?: boolean): Vector4;
/** checks if a point is inside the shape of a node */
isPointInside(
x: number,