How can I lock draw.io shapes, so they can't be moved anymore?

I created a draw.io diagram and now like to lock the shapes so they can’t be moved accidentally. How can I achieve that?

Hi there. There are two ways that you can lock shapes in draw.io. Which of the three options is right for you depends on whether you want to lock all or only part of your shapes.

Lock all shapes
Go to the view tab in the menu bar and select Layers. The menu for layers is now visible. Click on the lock to the left of each layer to lock all shapes on that layer. If you are working with multiple layers, you may need to lock several or all layers.

Lock only a subset of shapes
If you want to lock only one shape or a subset of shapes, simply select the shapes you want to lock and hit Ctrl+L (Windows) or Cmd+L (Mac). Or you can choose the “Lock/Unlock” option from the menu. And you are done already.

Lock only the position OR the text of shapes
Select the shapes you wish to lock and go to the format panel on the right-hand side (if the format panel is not visible, go to Menu > View > Format panel). Choose the tab Style and click on the Property section in the lower left area to expand it. Go to the option Moveable and uncheck the box. Now it will no longer be possible to move the shapes. Compared to locking the layers, this solution has the advantage that the shapes themselves can still be formatted. If you want to disable this option as well, you can also uncheck the Editable checkbox.

1 Like