SpreadJS Documentation
GC.Spread.Sheets.Shapes Namespace / ConnectorShape type / endConnector Method
The end connector info of the connectorShape.
The name of the end connector.
The connect point index of the end connector.
In This Topic
    endConnector Method
    In This Topic
    Gets or sets the end 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.endConnector(connector, connector.name, connector.index);
    function endConnector( 
       connector : object,
       connector.name : string,
       connector.index : number
    ) : object;

    Parameters

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

    Return Value

    connectorInfo - If no value is set, returns the end connector info of the connectorShape. When the connectorShape has no end connector returns null. connectorInfo.name {string} The name of the end connector. connectorInfo.index {number} The connect point index of the end connector. connectorInfo.shape {GC.Spread.Sheets.Shapes.Shape} The end 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 endConnector = shape.endConnector();
    shape2.endConnector({name: shape1.name(), index: 2});
    See Also