Back to Devexpress

DiagramEditOperation.ChangeShapeText Property

aspnet-js-diagrameditoperation-dot-changeshapetext.md

latest1.5 KB
Original Source

DiagramEditOperation.ChangeShapeText Property

Identifies the ChangeShapeText operation.

Declaration

ts
static readonly ChangeShapeText: string

Property Value

TypeDescription
string

Returns “ChangeShapeText”.

|

Remarks

The operation parameter returns the ChangeShapeText value if the RequestEditOperation event fired because a user changed a shape’s text.

aspx
<dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px">
    <ClientSideEvents RequestEditOperation="onRequestEditOperation" />
    ...
javascript
function onRequestEditOperation(s, e) {
    if(e.operation === DiagramEditOperation.ChangeShapeText) {
        if(e.args.text === "") {
            if(e.reason !== DiagramRequestEditOperationReason.CheckUIElementAvailability)
                showWarning("A shape text cannot be empty.");
            e.allowed = false;
        }
    }
    ...
}

The RequestEditOperation event does not fire for the ChangeShapeText operation if the AllowChangeShapeText property is set to false.

See Also

DiagramEditOperation Class

DiagramEditOperation Members