Javascript example to demonstrate how can fit the BPMN diagram after load.
- ⏩ live environment
- to run locally, open the index.html directly in a Web Browser
-
You need to initialize the BPMN container with a fixed width & a fixed height, and load the BPMN diagram, like done here.
-
Fit the BPMN container.
bpmnVisualization.fit({ type: bpmnvisu.FitType.Horizontal, margin: 10 });
ℹ️ type
and margin
are optional.
Moreover, margin
is only considered when FitType is not None.