in my project I would like to switch from BPMN viewer to BPMN modeler for the same file.
Is there any kind of best practise?
It would be nice if I can use the same libary to use viewer and modeler.
Maybe is there any kind of flag, which I not discovered until now, to decide whether a diagram is editable or not.
At the moment I have one view which shows the bpmn viewer to show a diagram. By click on an edit button a new view with the bpmn modeler is loaded. This switch is working, because I use viewer.clear() and viewer.detach().
If I want to go back from modeler to viewer, I have the issue that the palette control is still available at the viewer. My impression is that modeler.detach() is not working in the same way like viewer.detach().
I also tried to use modeler.destroy() but it had other side effects.
I have read there where a lot of other request related to this topic, but unfortunately this ReadOnly.js seams to be to old or not working anymore. I did’t find any alternative.
Many Thanks in advanced,