fix(util): Correct CallActivities rendering

CallActivities aren't expanded by default the behavior can be set by 'di.isExpanded'

close  #131
This commit is contained in:
jdotzki 2014-09-22 12:00:11 +02:00
parent 29ec039df9
commit 2f64d1f4c5
1 changed files with 9 additions and 2 deletions

View File

@ -5,5 +5,12 @@ module.exports.isExpandedPool = function(semantic) {
};
module.exports.isExpanded = function(semantic) {
return !semantic.$instanceOf('bpmn:SubProcess') || semantic.di.isExpanded;
// Is type expanded by default?
var isDefaultExpanded = !(semantic.$instanceOf('bpmn:SubProcess') || semantic.$instanceOf('bpmn:CallActivity'));
// For non default expanded types -> evaluate the expanded flag
var isExpanded = isDefaultExpanded || semantic.di.isExpanded;
return isExpanded;
};