How do I turn off editing and deletion of shapes in a diagram, but still allow them to be repositioned by dragging? I can turn off editing for shapes, connectors and the whole diagram, but then I can't move them.
3 Answers, 1 is accepted
answered on 19 Sep 2017, 09:20 AM
The Diagram has a shapeDefaults.editable.tools configuration option that lets you specify the list of tools that should be available in the widget. It should be a non-empty array, but you can, for example, only declare the Undo and Redo options, which are meaningful when the user is dragging shapes:
Is this also possible using the server side wrapper? If so, would you have an example?
answered on 19 Sep 2017, 12:19 PM
To start with, I should note that the Undo and Redo tools are only meaningful in the Diagram toolbar and not the shapes tools, so my suggestion about using them was not correct. When it comes to shapes, the supported tools are the ones listed in the API reference: "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 degree. "rotateAnticlockwise" - The selected items can be rotated anticlockwise. The default rotation value is 90 degree.