SpreadJS Documentation
addConnector Method
GC.Spread.Sheets.Shapes Namespace > ShapeCollection type : addConnector Method
The name of the shape. If leave blank an unique name will be generated.
The type of the connector.
The x location of the start point for the connector shape.
The y location of the start point for the connector shape.
The x location of the end point for the connector shape.
The y location of the end point for the connector shape.
Add a Connector Shape to shape collection
Syntax
var instance = new GC.Spread.Sheets.Shapes.ShapeCollection(sheet);
var value; // Type: ConnectorShape
value = instance.addConnector(name, connectorType, beginX, beginY, endX, endY);
function addConnector( 
   name : string,
   connectorType : ConnectorType,
   beginX : number,
   beginY : number,
   endX : number,
   endY : number
) : ConnectorShape;

Parameters

name
The name of the shape. If leave blank an unique name will be generated.
connectorType
The type of the connector.
beginX
The x location of the start point for the connector shape.
beginY
The y location of the start point for the connector shape.
endX
The x location of the end point for the connector shape.
endY
The y location of the end point for the connector shape.
Example
//This example shows how to add a connector shape
var shape1 = activeSheet.shapes.addConnector("shape1", GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 200);
See Also

Reference

ShapeCollection type