* Calculates the render area of this node, populating both boundingRect and renderArea. * Called automatically at the start of every frame.
(ctx: CanvasRenderingContext2D)
| 1927 | * Called automatically at the start of every frame. |
| 1928 | */ |
| 1929 | updateArea(ctx: CanvasRenderingContext2D): void { |
| 1930 | const bounds = this.#boundingRect |
| 1931 | this.measure(bounds, ctx) |
| 1932 | this.onBounding?.(bounds) |
| 1933 | |
| 1934 | const renderArea = this.#renderArea |
| 1935 | renderArea.set(bounds) |
| 1936 | // 4 offset for collapsed node connection points |
| 1937 | renderArea[0] -= 4 |
| 1938 | renderArea[1] -= 4 |
| 1939 | // Add shadow & left offset |
| 1940 | renderArea[2] += 6 + 4 |
| 1941 | // Add shadow & top offsets |
| 1942 | renderArea[3] += 5 + 4 |
| 1943 | } |
| 1944 | |
| 1945 | /** |
| 1946 | * checks if a point is inside the shape of a node |
no test coverage detected