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;
|
||
|
};
|