g.Rect.fromRectUnion(...rects)
Returns a new rectangle object that is large enough to contain given rects, where each rect is an object with x, y, width and height properties. Examples:
const rect = g.Rect.fromRectUnion(new g.Rect(0, 0, 10, 10), new g.Rect(10, 10, 10, 10));
const rect2 = g.Rect.fromRectUnion({ x: 0, y: 0, height: 10, width: 10 }, { x: 10, y: 10, height: 10, width: 10 });
// { x: 0, y: 0, width: 20, height: 20 }