SpreadJS Documentation
group Method
GC.Spread.Sheets.Shapes Namespace > ShapeCollection type : group Method
The shapes to group.
Groups the Shapes.
Syntax
var instance = new GC.Spread.Sheets.Shapes.ShapeCollection(sheet);
var value; // Type: Shape
value = instance.group(shapes);
function group( 
   shapes : undefined
) : Shape;

Parameters

shapes
The shapes to group.

Return Value

The Shape group.
Example
//This sample shows how to group some shapes
var shape1 = activeSheet.shapes.add("shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 50, 100, 150);
var shape2 = activeSheet.shapes.addConnector("shape2", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
var shapes = [shape1, shape2];
var groupShape = activeSheet.shapes.group(shapes)
See Also

Reference

ShapeCollection type