My project is heavily dependent on bpmn.js. When I add a notation I should be able to move the notation which is the expected behaviour. But should restrict movement of label attached to it.
I tried returning false from ‘shape.move’ etc but it is not working. Please provide a solution.
import { some } from 'min-dash'; // you can also use lodash's version
function isExternalLabel(element) {
return !!element.labelTarget; // duck typing
}
this.addRule('elements.move', HIGH_PRIORITY, ({ elements }) => {
return !some(elements, isExternalLabel);
});