mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-10 09:05:58 +00:00
b233ab957c
This commit adds message flow + collaboration specific snapping by subclassing the diagram-js provided default Snapping implementation. * Add collaboration snapping * Rename lib/util/{Name}.js -> lib/util/{Name}Util.js Closes #255
22 lines
446 B
JavaScript
22 lines
446 B
JavaScript
'use strict';
|
|
|
|
var is = require('./ModelUtil').is,
|
|
getBusinessObject = require('./ModelUtil').getBusinessObject;
|
|
|
|
module.exports.isExpanded = function(element) {
|
|
|
|
if (is(element, 'bpmn:CallActivity')) {
|
|
return false;
|
|
}
|
|
|
|
if (is(element, 'bpmn:SubProcess')) {
|
|
return getBusinessObject(element).di.isExpanded;
|
|
}
|
|
|
|
if (is(element, 'bpmn:Participant')) {
|
|
return !!getBusinessObject(element).processRef;
|
|
}
|
|
|
|
return true;
|
|
};
|