All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DiagramShape.attachedConnectorIds Property

Gets an array of attached connector identifiers.

Declaration

attachedConnectorIds: string[]

Property Value

Type Description
string[]

An array of attached connector identifiers.

Remarks

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 != e.args.shape.id) {
        if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
          showWarning("You cannot delete a 'Team' shape that has a child shape.");
        e.allowed = false;
        break;
      }
    }
  }
}

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