Skip to main content
All docs

DiagramShape.attachedConnectorIds Property

Gets an array of attached connector identifiers.


attachedConnectorIds: string[]

Property Value

Type Description

An array of attached connector identifiers.


if(e.operation === DiagramEditOperation.DeleteShape) {
  if(e.args.shape.type === "team") {
    for(var i = 0; i < e.args.shape.attachedConnectorIds.length; i++) {
      if(s.GetItemById(e.args.shape.attachedConnectorIds[i]).toId != {
        if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
          showWarning("You cannot delete a 'Team' shape that has a child shape.");
        e.allowed = false;

Run Demo: Editing Restrictions

When a user pastes or clones several items in a diagram, the control adds the items to the model one by one. For each added item, the RequestEditOperation event fires. In the event handler, you can access the processed item. However, if you call the GetItemById(id) method to access an attached connector, you can get the undefinedresult if the item is not added to the model yet.

See Also