MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / getBounding

Method getBounding

src/LGraphNode.ts:1913–1923  ·  view source on GitHub ↗

* returns the bounding of the object, used for rendering purposes * @param out {Float32Array[4]?} [optional] a place to store the output, to free garbage * @param includeExternal {boolean?} [optional] set to true to * include the shadow and connection points in the bounding calculation *

(out?: Rect, includeExternal?: boolean)

Source from the content-addressed store, hash-verified

1911 * @returns the bounding box in format of [topleft_cornerx, topleft_cornery, width, height]
1912 */
1913 getBounding(out?: Rect, includeExternal?: boolean): Rect {
1914 out ||= new Float32Array(4)
1915
1916 const rect = includeExternal ? this.renderArea : this.boundingRect
1917 out[0] = rect[0]
1918 out[1] = rect[1]
1919 out[2] = rect[2]
1920 out[3] = rect[3]
1921
1922 return out
1923 }
1924
1925 /**
1926 * Calculates the render area of this node, populating both {@link boundingRect} and {@link renderArea}.

Callers 1

#processMiddleButtonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected