How to disable move node?

how to disable move node ?

微信截图_20200521135746

微信截图_20200521135759

diagram-js and therefore bpmn-js which is built on top have a rules concept that allows you to specify what is allowed and what isn’t. In your case you’d want to override the default rule for elements.move.

Here’s an example of adding custom rules: https://github.com/bpmn-io/bpmn-js-examples/tree/master/custom-modeling-rules

In case you want to disallow modeling completely you can use the viewer instead of the modeler.

whether it can be set in a simple way, such as :

additionalModules:[
              BpmnModeler, {
                paletteProvider:['value',''],
                labelEditingProvider:['value', ''],
                contextPadProvider: ['value', ''],
                bendpoints: [ 'value', {} ],
              }
            ],

It looks like what you’re looking for is a read-only viewer:

import BpmnViewer from "bpmn-js/lib/Viewer";

or

import BpmnNavigatedViewer from "bpmn-js/lib/NavigatedViewer";

Example: https://codesandbox.io/s/bpmn-js-navigated-viewer-89xdf