Remove dragging of the diagram

After my diagram is rendered, i want to remove the dragging part of svg. I dont want to be able to drag the diagram. How can it be done?

Exclude the MoveCanvas from your modeler build, if you’d like to disable canvas movement all together.

ok so if i have bpmn tool integrated with my application. i am installing directly Modeler.js into my node modules folder. so i have to override the nodemodules folder file right?

No, please do not override stuff in your node_modules.

Instead, consult our examples and learn how to extend bpmn-js without monkey patching.

@nikku, is there a simpler recommended way to exclude MoveCanvas from the _modules property than to implement a Viewer subclass and filter through all default canvases in order to remove this one? From the code I figured that there is a modules option, but I couldn’t figure how to remove modules, rather than add new ones.
As a consequence, I’ve ended up initializing my viewer with this awful code:

viewer = new BpmnJS({
    container: canvas,
    modules: BpmnJS.prototype.getModules().filter(function(e) {return !e.moveCanvas;})

First of all, please don’t necrobump old topics.

You can override any module with an empty module:

new BpmnJS({
  additionalModules: [
    { moveCanvas: [ 'value', null ] }