SpreadJS 13
GC.Spread.Sheets.Shapes Namespace / ConnectorShape type / startConnector Method
The start connector info of the connectorShape.
The name of the start connector.
The connect point index of the start connector.
In This Topic
    startConnector Method
    In This Topic
    Gets or sets the start connector info of the connectorShape.
    Syntax
    var instance = new GC.Spread.Sheets.Shapes.ConnectorShape(worksheet, name, connectorType, beginX, beginY, endX, endY);
    var value; // Type: object
    value = instance.startConnector(connector, connector.name, connector.index);
    function startConnector( 
       connector : object,
       connector.name : string,
       connector.index : number
    ) : object;

    Parameters

    connector
    The start connector info of the connectorShape.
    connector.name
    The name of the start connector.
    connector.index
    The connect point index of the start connector.

    Return Value

    connectorInfo - If no value is set, returns the start connector info of the connectorShape. When the connectorShape has no start connector returns return null. connectorInfo.name {string} The name of the start connector. connectorInfo.index {number} The connect point index of the start connector. connectorInfo.shape {GC.Spread.Sheets.Shapes.Shape} The start connector.
    Example
    var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
    var shape2 = sheet.shapes.addConnector("myShape", GC.Spread.Sheets.Shapes.ConnectorType.straight, 220, 120, 300, 120);
    var startConnector = shape.startConnector();
    shape2.startConnector({name: shape1.name(), index: 2});
    See Also