Skip to content

Commit

Permalink
feat: disable diagram navigation (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouffard committed Oct 24, 2022
1 parent e0b6944 commit 755c3c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BpmnVisualization } from "bpmn-visualization";
import { BpmnVisualization, FitType } from "bpmn-visualization";

import collapsedDiagram from "./diagrams/EC-purchase-orders-collapsed.bpmn?raw";
import { configureButtons } from "./buttons";
Expand All @@ -10,12 +10,11 @@ window.loadBpmnDiagram = loadBpmnDiagram;
// 'bpmn-visualization' API documentation: https://process-analytics.github.io/bpmn-visualization-js/api/index.html
const mainBpmnVisualization = new BpmnVisualization({
container: 'main-bpmn-container',
navigation: { enabled: true } // remove this line or set to false if you don't want to use Diagram Navigation
});

// Load BPMN diagram
// Try the "Center" type to fit the whole container and center the diagram
mainBpmnVisualization.load(collapsedDiagram, { fit: { type: "Center", margin: 10 } });
mainBpmnVisualization.load(collapsedDiagram, { fit: { type: FitType.Center, margin: 10 } });


// Interaction
Expand Down

0 comments on commit 755c3c1

Please sign in to comment.