Diagram read only

by default diagrams are set to read only (diagram.model.isReadOnly = true)
but when I set the property back to diagram.model.isReadOnly = false, diagrams are still not editable, not able to drag and drop from the palette, not able to draw links, do I have to enable everything one by one? I was expecting “diagram.model.isReadOnly = false” should take care of enabling to edit mode.

That’s probably because just setting Model.isReadOnly to true isn’t enough to disable the user’s editing abilities. You also need to set Diagram.isReadOnly to true.

Or set it back to false if you are making the model modifiable again.

I tried setting both properties to false (model.isreadonly and diagram.isreadyonly)- but still the diagram is not editable,

Well, I had just tried it to be sure, so there must be something else going on in your code.

A complete list of permission-related properties is discussed at: GoJS User Permissions -- Northwoods Software