This commit is contained in:
hanjian
2024-08-14 15:17:51 +08:00
parent 20a221c1a2
commit b610f94b2e
3483 changed files with 650965 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import {
filter
} from 'min-dash';
import {
isAny
} from '../modeling/util/ModelingUtil';
/**
* Registers element exclude filters for elements that
* currently do not support distribution.
*/
export default function BpmnDistributeElements(distributeElements) {
distributeElements.registerFilter(function(elements) {
return filter(elements, function(element) {
var cannotDistribute = isAny(element, [
'bpmn:Association',
'bpmn:BoundaryEvent',
'bpmn:DataInputAssociation',
'bpmn:DataOutputAssociation',
'bpmn:Lane',
'bpmn:MessageFlow',
'bpmn:Participant',
'bpmn:SequenceFlow',
'bpmn:TextAnnotation'
]);
return !(element.labelTarget || cannotDistribute);
});
});
}
BpmnDistributeElements.$inject = [ 'distributeElements' ];

View File

@@ -0,0 +1,12 @@
import DistributeElementsModule from 'diagram-js/lib/features/distribute-elements';
import BpmnDistributeElements from './BpmnDistributeElements';
export default {
__depends__: [
DistributeElementsModule
],
__init__: [ 'bpmnDistributeElements' ],
bpmnDistributeElements: [ 'type', BpmnDistributeElements ]
};