g.js — graphical objects for JavaScript

groupgroup

Combine multiple shapes together.

var r = g.rect({x: -75, y: 0}, 100, 100);
var e = g.ellipse({x: 75, y: 0}, 100, 100);
g.group(r, e);

This is often used with align to position shapes as a whole.

Parameters

  • shapes: The list of shapes to group.

See Also

  • ungroup: Decompose the input group into a list of paths.