Back to Devexpress

ASPxClientDiagramRequestEditOperationEventArgs.args Property

aspnet-js-aspxclientdiagramrequesteditoperationeventargs-d78f13d1.md

latest4.7 KB
Original Source

ASPxClientDiagramRequestEditOperationEventArgs.args Property

Contains information about the processed shape or connector.

Declaration

ts
args: any

Property Value

TypeDescription
any

An object that contains information about the currently processed shape or connector.

|

Remarks

The args property’s value type depends on the currently being processed operation. The table below lists the available operations, their descriptions, and the corresponding property types.

OperationUser action / IU update operation causes the event to be raisedReturn value’s type
AddShapeA user is about to add a shape / The control determines the Paste command’s visibility.ASPxClientDiagramAddShapeEventArgs
AddShapeFromToolboxThe control determines the visibility of a shape in the toolbox or context toolbox.ASPxClientDiagramAddShapeFromToolboxEventArgs
BeforeChangeConnectorTextA user is about to edit a connector’s text.ASPxClientDiagramBeforeChangeConnectorTextEventArgs
BeforeChangeShapeTextA user is about to edit a shape’s text.ASPxClientDiagramBeforeChangeShapeTextEventArgs
ChangeConnectionA user is about to link or delink a connector from a shape / The control determines a connection point’s visibility.ASPxClientDiagramChangeConnectionEventArgs
ChangeConnectorPointsA user changed a connector’s points.ASPxClientDiagramChangeConnectorPointsEventArgs
ChangeConnectorTextA user changed a connector’s text.ASPxClientDiagramChangeConnectorTextEventArgs
ChangeShapeTextA user changed a shape’s text.ASPxClientDiagramChangeShapeTextEventArgs
DeleteConnectorA user is about to delete a connector / The control determines the Cut and Delete commands’ visibility.ASPxClientDiagramDeleteConnectorEventArgs
DeleteShapeA user is about to delete a shape / The control determines the visibility of the Cut and Delete commands.ASPxClientDiagramDeleteShapeEventArgs
MoveShapeA user moved a shape.ASPxClientDiagramMoveShapeEventArgs
ResizeShapeA user resized a shape.ASPxClientDiagramResizeShapeEventArgs
javascript
function onRequestEditOperation(s, e) {
    if(e.operation === DiagramEditOperation.ResizeShape) {
        if(e.args.newSize.width < 1 || e.args.newSize.height < 0.75) {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("The shape size is too small.");
            e.allowed = false;
        }
    }
    else if(e.operation === DiagramEditOperation.ChangeShapeText) {
        if(e.args.text === "") {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("A shape text cannot be empty.");
            e.allowed = false;
        }
    }
    ...
}

Run Demo: Editing Restrictions

See Also

ASPxClientDiagramRequestEditOperationEventArgs Class

ASPxClientDiagramRequestEditOperationEventArgs Members