Javascript example to demonstrate how to use the same container on a double click on an element of the BPMN Diagram.
- ⏩ live environment
- to run locally, open the index.html directly in a Web Browser
After the instantiation of the main BpmnVisualization
object, get the HTML element corresponding to the call activity to add a listener to load a new BPMN Diagram in the same container on activation.
const callActivityElt = bpmnVisualization.bpmnElementsRegistry.getElementsByIds(['call_activity'])[0].htmlElement;
callActivityElt.ondblclick = () => {
bpmnVisualization.load(getProcurementBpmnDiagram(), { fit: {type: 'Center'} });
}