bpmn-js/lib/util/Di.js
jdotzki 2f64d1f4c5 fix(util): Correct CallActivities rendering
CallActivities aren't expanded by default the behavior can be set by 'di.isExpanded'

close  #131
2014-09-22 12:00:11 +02:00

17 lines
459 B
JavaScript

'use strict';
module.exports.isExpandedPool = function(semantic) {
return !!semantic.processRef;
};
module.exports.isExpanded = function(semantic) {
// 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;
};