New to Kendo UI for jQueryStart a free 30-day trial

Defines the shape editable options.

Default: true

<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
    shapeDefaults: {
        editable: {
            connect: true,
            drag: true,
            resize: true,
            rotate: true
        }
    },
    shapes: [
        { id: "1", x: 100, y: 100, content: { text: "Editable Shape" } }
    ]
});
</script>

Specifies if new connections can be added using the shapes connectors.

Default: true

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapeDefaults: {
      editable: {
        connect: false
      }
    },
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      x: 100,
      y: 20
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      },
      x: 250,
      y: 20
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      },
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>

Specifies if the shapes can be dragged.

Default: true

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapeDefaults: {
      editable: {
        drag: false
      }
    },
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      x: 100,
      y: 20
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      },
      x: 250,
      y: 20
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      },
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>

Specifies if the shapes can be removed.

Default: true

<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapeDefaults: {
      editable: {
        remove: false
      }
    },
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      x: 100,
      y: 20
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      },
      x: 250,
      y: 20
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      },
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>

Specifies the toolbar tools. Provides all options that are supported for toolbar.items. If set to false, no edit tools will be displayed.

The predefined tools are:

  • "edit" - The selected item can be edited.
  • "delete" - The selected items can be deleted.
  • "rotateClockwise" - The selected items can be rotated clockwise. The default rotation value is 90 degrees.
  • "rotateAnticlockwise" - The selected items can be rotated anticlockwise. The default rotation value is 90 degrees.
<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapeDefaults: {
      editable: {
        tools: [{
          name: "delete"
        }, {
          name: "rotateClockwise"
        }, {
          name: "rotateAnticlockwise"
        }]
      }
    },
    shapes: [{
      id: "1",
      content: {
        text: "Monday"
      },
      x: 100,
      y: 20
    }, {
      id: "2",
      content: {
        text: "Tuesday"
      },
      x: 250,
      y: 20
    }, {
      id: "3",
      content: {
        text: "Wednesday"
      },
      x: 250,
      y: 200
    }],
    connections: [{
      from: "1",
      to: "2"
    },{
      from: "2",
      to: "3"
    }],
    connectionDefaults: {
      endCap: "ArrowEnd"
    }
  });
</script>
<div id="diagram"></div>
<script>
  $("#diagram").kendoDiagram({
    shapes: [{}],
    shapeDefaults: {
      editable: {
        tools: [{
          type: "button",
          text: "Set Content",
          click: function() {
            var selected = $("#diagram").getKendoDiagram().select();
            var content = $("#content").val();
            for (var idx = 0; idx < selected.length; idx++) {
              selected[idx].content(content);
            }
          }
        }, {
          template: "<input id='content' class='k-textbox' value='Foo' />"
        }]
      }
    }
  });
</script>